Skip to content

Commit 6104318

Browse files
committed
update tests
1 parent bea7e1a commit 6104318

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

packages/svelte/tests/compiler-errors/samples/export-derived-state/_config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import { test } from '../../test';
33
export default test({
44
error: {
55
code: 'invalid-derived-export',
6-
message: 'Cannot export derived state from a module',
6+
message:
7+
'Cannot export derived state from a module. To expose the current derived value, export a function returning its value',
78
position: [24, 66]
89
}
910
});

packages/svelte/tests/compiler-errors/samples/export-state/_config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import { test } from '../../test';
33
export default test({
44
error: {
55
code: 'invalid-state-export',
6-
message: 'Cannot export state from a module if it is reassigned',
6+
message:
7+
"Cannot export state from a module if it is reassigned. Either export a function returning the state value or only mutate the state value's properties",
78
position: [46, 86]
89
}
910
});

packages/svelte/tests/compiler-errors/samples/runes-export-named-state/_config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import { test } from '../../test';
33
export default test({
44
error: {
55
code: 'invalid-state-export',
6-
message: 'Cannot export state from a module if it is reassigned',
6+
message:
7+
"Cannot export state from a module if it is reassigned. Either export a function returning the state value or only mutate the state value's properties",
78
position: [28, 53]
89
}
910
});

0 commit comments

Comments
 (0)