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/transition-css-in-out-in/_config.js

21 lines
600 B

export default {
test({ assert, component, target, window, raf }) {
component.visible = true;
const div = target.querySelector('div');
assert.equal(div.style.animation, '__svelte_3809512021_0 100ms linear 0ms 1 both');
raf.tick(50);
component.visible = false;
// both in and out styles
assert.equal(div.style.animation, '__svelte_3809512021_0 100ms linear 0ms 1 both, __svelte_3750847757_0 100ms linear 0ms 1 both');
raf.tick(75);
component.visible = true;
// reset original styles
assert.equal(div.style.animation, '__svelte_3809512021_1 100ms linear 0ms 1 both');
}
};