Skip to content

Commit 32d8b86

Browse files
committed
fix tests
1 parent 83a7df2 commit 32d8b86

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

packages/svelte/tests/runtime-runes/samples/export-binding/_config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ export default test({
55
dev: true // to ensure we we catch the error
66
},
77
error:
8-
'Cannot use bind:increment on this component because it is a component export, and you can only bind to properties in runes mode. ' +
9-
'Use bind:this instead and then access the property on the bound component instance.'
8+
'Component .../samples/export-binding/Counter.svelte has an export named increment that a consumer component is trying to access using bind:increment, which is disallowed. ' +
9+
'Instead, use bind:this (e.g. <Counter bind:this={component} />) and then access the property on the bound component instance (e.g. component.increment).'
1010
});

packages/svelte/tests/runtime-runes/samples/props-not-bindable-spread/_config.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ export default test({
55
dev: true
66
},
77
error:
8-
'Cannot use bind:count on this component because the property was not declared as bindable. ' +
9-
'To mark a property as bindable, use the $bindable() rune like this: `let { count = $bindable() } = $props()`',
8+
'A component is binding to property count of Counter.svelte (i.e. <Counter bind:count />). This is disallowed because the property was ' +
9+
'not declared as bindable inside .../samples/props-not-bindable-spread/Counter.svelte. To mark a property as bindable, use the $bindable() rune ' +
10+
'in Counter.svelte like this: `let { count = $bindable() } = $props()`',
1011
html: `0`
1112
});

packages/svelte/tests/runtime-runes/samples/props-not-bindable/_config.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ export default test({
55
dev: true
66
},
77
error:
8-
'Cannot use bind:count on this component because the property was not declared as bindable. ' +
9-
'To mark a property as bindable, use the $bindable() rune like this: `let { count = $bindable() } = $props()`',
8+
'A component is binding to property count of Counter.svelte (i.e. <Counter bind:count />). This is disallowed because the property was ' +
9+
'not declared as bindable inside .../samples/props-not-bindable/Counter.svelte. To mark a property as bindable, use the $bindable() rune ' +
10+
'in Counter.svelte like this: `let { count = $bindable() } = $props()`',
1011
html: `0`
1112
});

0 commit comments

Comments
 (0)