mirror of https://github.com/sveltejs/svelte
parent
1f35487ecd
commit
fe81d603c4
@ -1,10 +0,0 @@
|
|||||||
export default {
|
|
||||||
test({ assert, component, target, window, raf }) {
|
|
||||||
component.visible = true;
|
|
||||||
const div = target.querySelector('div');
|
|
||||||
assert.strictEqual(div.style.opacity, '0');
|
|
||||||
|
|
||||||
raf.tick(50);
|
|
||||||
assert.strictEqual(div.style.opacity, '');
|
|
||||||
}
|
|
||||||
};
|
|
@ -1,17 +0,0 @@
|
|||||||
<script>
|
|
||||||
export let visible;
|
|
||||||
|
|
||||||
function foo(node, params) {
|
|
||||||
return {
|
|
||||||
delay: 50,
|
|
||||||
duration: 100,
|
|
||||||
css: t => {
|
|
||||||
return `opacity: ${t}`;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{#if visible}
|
|
||||||
<div transition:foo>delayed</div>
|
|
||||||
{/if}
|
|
Loading…
Reference in new issue