From 8e871c455ce457596bda265a3e6414dd3edd79b0 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 15 Sep 2020 13:24:20 +0100 Subject: [PATCH] Fix german i18n test which was previously broken due to async --- __mocks__/browser-request.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/__mocks__/browser-request.js b/__mocks__/browser-request.js index 7d231fb9db..391be7c54f 100644 --- a/__mocks__/browser-request.js +++ b/__mocks__/browser-request.js @@ -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}, ""); }