Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@daun
Copy link
Member

@daun daun commented Sep 25, 2024

Description

  • Add a test for replacing a hook only once

Result

FAIL  tests/unit/hooks.test.ts > Hook registry > should allow replacing original handler only once

AssertionError: expected "spy" to be called 1 times, but got 0 times

 ❯ tests/unit/hooks.test.ts:30pr=958#step:6:31)5:26

    304|   await swup.hooks.call('enable', undefined, undefined, defaultHandler…
    305|   expect(defaultHandler).toBeCalledTimes(1);
       |                          ^
    306|   expect(customHandler).toBeCalledTimes(1);

@daun daun marked this pull request as draft September 25, 2024 19:49
@github-actions
Copy link

github-actions bot commented Sep 25, 2024

Size Change: +30 B (+0.13%)

Total Size: 23.4 kB

Filename Size Change
dist/Swup.modern.js 7.11 kB +9 B (+0.13%)
dist/Swup.module.js 8.03 kB +10 B (+0.12%)
dist/Swup.umd.js 8.27 kB +11 B (+0.13%)

compressed-size-action

@github-actions
Copy link

github-actions bot commented Sep 25, 2024

Playwright test results

passed  309 passed

Details

report  Open report ↗︎
stats  309 tests across 22 suites
duration  1 minute, 15 seconds
commit  44bf30b

@daun daun closed this Sep 26, 2024
@daun daun deleted the chore/investigate-hooks-replaced-once branch September 26, 2024 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant