mirror of
https://github.com/anticensority/runet-censorship-bypass.git
synced 2024-11-24 02:13:43 +03:00
Change asserts to expects, add one more test
This commit is contained in:
parent
74482c1257
commit
1feca9b31d
|
@ -104,9 +104,12 @@
|
|||
|
||||
const getCurrentConfigs = function getCurrentConfigs() {
|
||||
|
||||
return kitchenState(modsKey);
|
||||
const oldMods = kitchenState(modsKey);
|
||||
if (oldMods) {
|
||||
return oldMods;
|
||||
}
|
||||
|
||||
// In case of migration.
|
||||
// In case of migration or first install.
|
||||
const [err, mods, ...warns] = createPacModifiers( kitchenState(modsKey) );
|
||||
if (err) {
|
||||
throw err;
|
||||
|
|
|
@ -24,7 +24,10 @@ Mocha.describe('window.apis.pacKitchen', function () {
|
|||
Mocha.it('is evaluated and defined', function () {
|
||||
|
||||
CachelessRequire('../35-pac-kitchen-api.js');
|
||||
Chai.assert.ok(window.apis.pacKitchen, 'exports to globals');
|
||||
Chai.expect(window.apis.pacKitchen, 'to be exported as global').to.exist;
|
||||
|
||||
const mods = window.apis.pacKitchen.getPacMods();
|
||||
Chai.expect(mods, 'expose default configs on first run').to.exist;
|
||||
|
||||
});
|
||||
|
||||
|
|
|
@ -18,8 +18,8 @@ Mocha.describe('window.utils', function () {
|
|||
Mocha.it('exports as global', function () {
|
||||
|
||||
CachelessRequire(initApis);
|
||||
Chai.assert.ok(window.utils, 'exported to globals');
|
||||
Chai.assert.isNotOk(window.apis.version.ifMini, 'is not MINI version');
|
||||
Chai.expect(window.utils, 'to be exported as global').to.exist;
|
||||
Chai.expect(window.apis.version.ifMini, 'to be marked as not MINI version by default').to.be.false;
|
||||
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user