Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make tests deterministic #559

Merged
merged 10 commits into from
Mar 17, 2021
Merged

make tests deterministic #559

merged 10 commits into from
Mar 17, 2021

Conversation

Rich-Harris
Copy link
Member

No description provided.

Copy link
Member

@benmccann benmccann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so much better!

packages/kit/src/runtime/client/renderer.js Outdated Show resolved Hide resolved
@Conduitry
Copy link
Member

Do you intend the events to be part of a public API that are present in production apps? Is this (for now?) what's happening instead of the onNavigation callback you mentioned on the corresponding issue?

@Rich-Harris
Copy link
Member Author

Was thinking public API, yeah. Docs will need updating.

Not so much an alternative to onNavigation as something that can be used for testing without Cypress. I was really just thinking out loud — onNavigation serves a slightly different purpose in my head. I'll open a separate issue for it

@Conduitry
Copy link
Member

The test that failed in https://github.com/sveltejs/kit/pull/559/checks?check_run_id=2127374998 looks like it was probably a not-waiting-long-enough thing for a click that didn't result in a navigation. We could try to deal with that in some way (via retries?) in this PR or elsewhere or bump up the delay or just ignore it.

@Rich-Harris Rich-Harris marked this pull request as ready for review March 17, 2021 03:33
Copy link
Member

@Conduitry Conduitry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'm happy with this now. The extra code for the new events is really minimal, so we can do without separate for-test and for-prod builds as well, which might also be undesirable for other reasons anyway.

@Rich-Harris Rich-Harris merged commit 0512fd1 into master Mar 17, 2021
@Rich-Harris Rich-Harris deleted the gh-404 branch March 17, 2021 03:34
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.

None yet

3 participants