Skip to content

Commit

Permalink
chore: fix tests
Browse files Browse the repository at this point in the history
when running in Svelte 5 mode
  • Loading branch information
dummdidumm committed Aug 19, 2024
1 parent 50df940 commit 87434dd
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions test/loader.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ describe('loader', () => {

if (isSvelte5Plus) {
expect(err.message).to.eql(d`
CompileError: Unexpected block closing tag
(block_unexpected_close)
test/fixtures/parse-error.html1:22
`);
CompileError: block_unexpected_close: Unexpected block closing tag
test/fixtures/parse-error.html:1:22
1: <p>Count: {count}</p>{/if}
^`);
} else {
expect(err.message).to.eql(d`
ParseError: Unexpected block closing tag (1:23)
Expand All @@ -112,10 +112,13 @@ describe('loader', () => {

if (isSvelte5Plus) {
expect(err.message.trim().replace(/\r/g, '')).to.eql(d`
CompileError: A component cannot have a default export
(module_illegal_default_export)
test/fixtures/validation-error.html2:1
`);
CompileError: module_illegal_default_export: A component cannot have a default export
test/fixtures/validation-error.html:2:1
1: <script>
2: export default {};
^
3: </script>
4:`);
} else {
expect(err.message.trim().replace(/\r/g, '')).to.eql(d`
ValidationError: A component cannot have a default export (2:1)
Expand Down

0 comments on commit 87434dd

Please sign in to comment.