Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/__mocks__/jed/index.js')
-rw-r--r--spec/frontend/__mocks__/jed/index.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/frontend/__mocks__/jed/index.js b/spec/frontend/__mocks__/jed/index.js
new file mode 100644
index 00000000000..fa2be5aa6e2
--- /dev/null
+++ b/spec/frontend/__mocks__/jed/index.js
@@ -0,0 +1,17 @@
+/**
+ * ## Why are we mocking Jed?
+ *
+ * https://gitlab.com/gitlab-org/gitlab/-/issues/390934#note_1494028934
+ *
+ * It's possible that some environments run a specific locale. If the unit
+ * tests run under this condition, hardcoded values will fail. To make
+ * tests more deterministic across environments, let's skip loading translations
+ * in FE unit tests.
+ */
+const Jed = jest.requireActual('jed');
+
+export default class MockJed extends Jed {
+ constructor() {
+ super({});
+ }
+}