Skip to content

Commit d195cee

Browse files
committed
add a test
1 parent 4b85b11 commit d195cee

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

test/index.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,22 @@ test('animate', (t) => {
3939
t.same(node.childNodes.length, 1);
4040
t.same(node.childNodes[0].textContent, 'baz');
4141
});
42+
43+
test('Keyframes events', (t) => {
44+
const container = document.createElement('div');
45+
const onStart = () => onStart.called = true;
46+
const onEnd = () => onEnd.called = true;
47+
render(
48+
<Keyframes onStart={onStart} onEnd={onEnd}>
49+
<Frame duration={100}>foo</Frame>
50+
<Frame duration={100}>bar</Frame>
51+
</Keyframes>,
52+
container
53+
);
54+
55+
t.ok(onStart.called);
56+
clock.tick(100);
57+
t.notOk(onEnd.called);
58+
clock.tick(100);
59+
t.ok(onEnd.called);
60+
});

0 commit comments

Comments
 (0)