You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
491 B
16 lines
491 B
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}, "");
|
|
}
|
|
});
|
|
|