svelte-transitions icon indicating copy to clipboard operation
svelte-transitions copied to clipboard

Testing svelte-transitions

Open VishalAkhouri opened this issue 8 years ago • 0 comments

Is there a way to test svelte-transitions? I have used svelte-transitions in one of the svelte components TestComponent. And I am using karma jasmine for testing the component.

<div class="test" tabindex="-1" transition:slide>
     ...
</div>

However with the introduction of transition:slide, I started getting an error as below. Stack trace of the error:

TypeError: undefined is not an object (evaluating 'node.style.animation.split') in http://localhost:8082config/testUnit/test.files.js (line 580)
        generateKeyframes@http://localhost:8082webpack:///~/svelte/shared.js:94:0 <- config/testUnit/test.files.js:580:45
        start@http://localhost:8082webpack:///~/svelte/shared.js:146:0 <- config/testUnit/test.files.js:632:22
        run@http://localhost:8082webpack:///~/svelte/shared.js:130:0 <- config/testUnit/test.files.js:616:15
        http://localhost:8082config/testUnit/test.files.js:1032:23
        _flush@http://localhost:8082webpack:///~/svelte/shared.js:324:0 <- config/testUnit/test.files.js:810:26
        _set@http://localhost:8082config/testUnit/test.files.js:1102:13
        set@http://localhost:8082webpack:///~/svelte/shared.js:316:0 <- config/testUnit/test.files.js:802:11
        oncreate@http://localhost:8082webpack:///modules/notifications/notification.html:18:15 <- config/testUnit/test.files.js:881:12
        oncreate@[native code]
        _flush@http://localhost:8082webpack:///~/svelte/shared.js:324:0 <- config/testUnit/test.files.js:810:26
        TestComponent@http://localhost:8082config/testUnit/test.files.js:1278:13

I am not sure how to set this up for resolving node.style.animation.split. Can you provide any clues to test this!

VishalAkhouri avatar May 12 '17 07:05 VishalAkhouri