We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93f6d38 commit 3fde057Copy full SHA for 3fde057
1 file changed
packages/pluggable-widgets-tools/test-config/test-index.js
@@ -1,6 +1,21 @@
1
require("@testing-library/jest-dom");
2
const { TextEncoder, TextDecoder } = require("util");
3
4
+// `@swc/jest` can't inline mendix's ambient `const enum`s, so it emits a real
5
+// `require("mendix")`. Mock the runtime values.
6
+// Keep in sync with node_modules/mendix/index.d.ts.
7
+jest.mock("mendix", () => ({
8
+ ValueStatus: {
9
+ Available: "available",
10
+ Unavailable: "unavailable",
11
+ Loading: "loading"
12
+ },
13
+ FormatterType: {
14
+ Number: "number",
15
+ DateTime: "datetime"
16
+ }
17
+}));
18
+
19
Object.defineProperties(global, {
20
TextEncoder: {
21
value: TextEncoder
0 commit comments