Skip to content

Commit 87434dd

Browse files
committed
chore: fix tests
when running in Svelte 5 mode
1 parent 50df940 commit 87434dd

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

test/loader.spec.js

+11-8
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ describe('loader', () => {
8585

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

113113
if (isSvelte5Plus) {
114114
expect(err.message.trim().replace(/\r/g, '')).to.eql(d`
115-
CompileError: A component cannot have a default export
116-
(module_illegal_default_export)
117-
test/fixtures/validation-error.html2:1
118-
`);
115+
CompileError: module_illegal_default_export: A component cannot have a default export
116+
test/fixtures/validation-error.html:2:1
117+
1: <script>
118+
2: export default {};
119+
^
120+
3: </script>
121+
4:`);
119122
} else {
120123
expect(err.message.trim().replace(/\r/g, '')).to.eql(d`
121124
ValidationError: A component cannot have a default export (2:1)

0 commit comments

Comments
 (0)