Skip to content

Commit c545c20

Browse files
committed
test(formatjs): validate issue #532 regression in ast mode (#594)
1 parent 6fdfdfa commit c545c20

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/formatjs/__tests__/wasm.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,11 @@ describe("formatjs swc plugin", () => {
121121
});
122122
`;
123123

124-
const output = await transformCode(input);
124+
const output = await transformCode(input, { ast: true });
125125

126126
expect(output).toMatch(/id: "[^"]+"/);
127-
// Should concatenate strings, not produce an empty array
128-
expect(output).toMatch(/defaultMessage: "Hello world"/);
127+
// In AST mode, defaultMessage should be a non-empty ICU AST array.
128+
expect(output).toMatch(/defaultMessage: \[/);
129129
expect(output).not.toMatch(/defaultMessage: \[\]/);
130130
});
131131

0 commit comments

Comments
 (0)