mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-22 16:18:14 +08:00
Fix german i18n test which was previously broken due to async
This commit is contained in:
parent
608249745a
commit
8e871c455c
@ -1,4 +1,5 @@
|
||||
const en = require("../src/i18n/strings/en_EN");
|
||||
const de = require("../src/i18n/strings/de_DE");
|
||||
|
||||
module.exports = jest.fn((opts, cb) => {
|
||||
const url = opts.url || opts.uri;
|
||||
@ -8,9 +9,15 @@ module.exports = jest.fn((opts, cb) => {
|
||||
"fileName": "en_EN.json",
|
||||
"label": "English",
|
||||
},
|
||||
"de": {
|
||||
"fileName": "de_DE.json",
|
||||
"label": "German",
|
||||
},
|
||||
}));
|
||||
} else if (url && url.endsWith("en_EN.json")) {
|
||||
cb(undefined, {status: 200}, JSON.stringify(en));
|
||||
} else if (url && url.endsWith("de_DE.json")) {
|
||||
cb(undefined, {status: 200}, JSON.stringify(de));
|
||||
} else {
|
||||
cb(true, {status: 404}, "");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user