-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
test(Transition): more test transition #1151
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
Conversation
When I add transiton test.It always fail down in me local dev.So its is slow with add test. and it lead me to confused with diff the behavior with v2.So I want to get some help to improve it. other. |
The reason your tests were failing inconsistently is because we are testing by talking to Puppeteer so everything is async and may or may not be longer than the actual microtask inside Puppeteer. So when you The way to fix that is by running the whole Another thing is the |
See 9d111f5 for the fixed version. |
Todo: |
]) | ||
// todo test event with arguments. Note: not get dom, get object. '{}' | ||
expect(beforeLeaveSpy).toBeCalled() | ||
expect(onLeaveSpy).not.toBeCalled() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's here.Should test hooks arguments.It will be meet error when i use expect(beforeLeaveSpy).toBeCalledWith(await page().evaluate(() => // get dom))
.I don't has right way.
No description provided.