Skip to content

Commit cfb4711

Browse files
committed
more
1 parent 2c410bb commit cfb4711

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

packages/svelte/tests/runtime-runes/samples/inspect-exception/_config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ export default test({
66
dev: true
77
},
88

9-
async test({ assert, target, logs }) {
9+
async test({ assert, target, logs, errors }) {
1010
const b1 = target.querySelector('button');
1111
b1?.click();
1212
flushSync();
1313

14+
assert.ok(errors.length > 0);
1415
assert.deepEqual(logs, ['init', 'a', 'init', 'b']);
1516
}
1617
});
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1+
import { assert } from 'vitest';
12
import { test } from '../../test';
23

34
export default test({
45
compileOptions: {
56
dev: true
67
},
7-
test() {}
8+
9+
test({ logs }) {
10+
assert.ok(logs.length > 0);
11+
}
812
});
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script>
22
const log = () => {
3-
console.log(snip);
3+
if (!snip) throw new Error('oops');
44
}
55
let x = $state(0);
66
</script>
@@ -9,4 +9,4 @@
99

1010
{#snippet snip()}
1111
snippet {x}
12-
{/snippet}
12+
{/snippet}

0 commit comments

Comments
 (0)