Skip to content

Commit 439a6e5

Browse files
committed
add test that fails with this code removed
1 parent 90a7aec commit 439a6e5

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { test } from '../../test';
2+
3+
export default test({
4+
html: `
5+
<p>static1 reactive1</p>
6+
<button>update</button>
7+
`,
8+
9+
async test({ assert, target }) {
10+
const btn = target.querySelector('button');
11+
await btn?.click();
12+
assert.htmlEqual(
13+
target.innerHTML,
14+
`
15+
<p>static1 reactive2</p>
16+
<button>update</button>
17+
`
18+
);
19+
}
20+
});
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<script>
2+
let reactive = $state('reactive1');
3+
let static_ = 'static1';
4+
</script>
5+
6+
<p>{static_} {reactive}</p>
7+
<button onclick={() => { static_ = 'static2'; reactive = 'reactive2'; }}>update</button>

0 commit comments

Comments
 (0)