Include a single entry in languages.json while testing

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
Mcat12
2019-10-09 14:17:43 -04:00
parent 948c31cf4f
commit 9ab5c7c54f
+3 -1
View File
@@ -21,7 +21,9 @@ jest.mock("react-i18next", () => ({
}));
// languages.json is generated during a build or run, so it may not exist yet
jest.mock("../../languages.json", () => [], { virtual: true });
jest.mock("../../languages.json", () => [{ code: "en", name: "English" }], {
virtual: true
});
it("configures i18n successfully", async () => {
// Provide a mock ajax function to the XHR backend