You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/runtime/samples/class-shortcut-with-transition/_config.js

31 lines
664 B

export default {
props: {
open: false,
border: true
},
html: '<p>foo</p>',
test({ assert, component, target, raf }) {
component.open = true;
raf.tick(100);
assert.htmlEqual(
target.innerHTML,
'<p>foo</p><p class="red svelte-1yszte8 border" style="">bar</p>'
);
component.open = false;
raf.tick(150);
assert.htmlEqual(
target.innerHTML,
'<p>foo</p><p class="red svelte-1yszte8 border" style="animation: __svelte_1333973250_0 100ms linear 0ms 1 both;">bar</p>'
);
component.open = true;
raf.tick(250);
assert.htmlEqual(
target.innerHTML,
'<p>foo</p><p class="red svelte-1yszte8 border" style="">bar</p>'
);
}
};