Skip to content

Commit efa1715

Browse files
charlespwdclaude
andcommitted
Update test expectations for @ohm-js/wasm error format
@ohm-js/wasm v0.6.17 FailedMatchResult returns generic "Match failed at pos N" messages instead of detailed syntax error information. getExpectedText() is not yet implemented in the WASM version. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 9089e92 commit efa1715

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

  • packages/theme-check-common/src/checks/liquid-html-syntax-error

packages/theme-check-common/src/checks/liquid-html-syntax-error/index.spec.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ describe('Module: LiquidHTMLSyntaxError', () => {
6565

6666
const offenses = await runLiquidCheck(LiquidHTMLSyntaxError, sourceCode);
6767
expect(offenses).to.have.length(1);
68-
expect(offenses[0].message).to.equal(`SyntaxError: expected "%}"`);
68+
// Note: @ohm-js/wasm returns generic error messages; getExpectedText() is not implemented
69+
expect(offenses[0].message).to.equal(`Match failed at pos 25`);
6970
});
7071

7172
it('should report unexpected tokens (2)', async () => {
@@ -75,7 +76,8 @@ describe('Module: LiquidHTMLSyntaxError', () => {
7576

7677
const offenses = await runLiquidCheck(LiquidHTMLSyntaxError, sourceCode);
7778
expect(offenses).to.have.length(1);
78-
expect(offenses[0].message).to.equal(`SyntaxError: expected ">", not """`);
79+
// Note: @ohm-js/wasm returns generic error messages; getExpectedText() is not implemented
80+
expect(offenses[0].message).to.equal(`Match failed at pos 21`);
7981
});
8082

8183
it('should report unexpected tokens (3)', async () => {
@@ -85,9 +87,8 @@ describe('Module: LiquidHTMLSyntaxError', () => {
8587

8688
const offenses = await runLiquidCheck(LiquidHTMLSyntaxError, sourceCode);
8789
expect(offenses).to.have.length(1);
88-
expect(offenses[0].message).to.equal(
89-
`SyntaxError: expected "#", a letter, "when", "sections", "section", "render", "liquid", "layout", "increment", "include", "elsif", "else", "echo", "decrement", "content_for", "cycle", "continue", "break", "assign", "tablerow", "unless", "if", "ifchanged", "for", "case", "capture", "paginate", "form", "end", "style", "stylesheet", "schema", "javascript", "raw", "comment", or "doc"`,
90-
);
90+
// Note: @ohm-js/wasm returns generic error messages; getExpectedText() is not implemented
91+
expect(offenses[0].message).to.equal(`Match failed at pos 23`);
9192
});
9293

9394
it('should not report syntax error in valid Liquid code', async () => {

0 commit comments

Comments
 (0)