mirror of
https://github.com/sveltejs/svelte.git
synced 2024-12-01 01:11:24 +01:00
add test for #891
This commit is contained in:
parent
218dcacef8
commit
1dad8f1936
14
test/runtime/samples/set-mutated-data/_config.js
Normal file
14
test/runtime/samples/set-mutated-data/_config.js
Normal file
@ -0,0 +1,14 @@
|
||||
const data = { foo: 0 };
|
||||
|
||||
export default {
|
||||
data,
|
||||
|
||||
html: '0',
|
||||
|
||||
test(assert, component, target) {
|
||||
data.foo = 42;
|
||||
component.set(data);
|
||||
|
||||
assert.htmlEqual(target.innerHTML, '42');
|
||||
}
|
||||
};
|
1
test/runtime/samples/set-mutated-data/main.html
Normal file
1
test/runtime/samples/set-mutated-data/main.html
Normal file
@ -0,0 +1 @@
|
||||
{{foo}}
|
Loading…
Reference in New Issue
Block a user