Down to 7 test failures
This commit is contained in:
parent
0041dae664
commit
ab3fb6581b
14 changed files with 122 additions and 91 deletions
16
__mocks__/browser-request.js
Normal file
16
__mocks__/browser-request.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
const en = require("../src/i18n/strings/en_EN");
|
||||
|
||||
module.exports = jest.fn((opts, cb) => {
|
||||
if (opts.url.endsWith("languages.json")) {
|
||||
cb(undefined, {status: 200}, JSON.stringify({
|
||||
"en": {
|
||||
"fileName": "en_EN.json",
|
||||
"label": "English",
|
||||
},
|
||||
}));
|
||||
} else if (opts.url.endsWith("en_EN.json")) {
|
||||
cb(undefined, {status: 200}, JSON.stringify(en));
|
||||
} else {
|
||||
cb(undefined, {status: 404}, "");
|
||||
}
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue