Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
lunaruan committed Jul 11, 2022
1 parent a42407a commit 5f7c343
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ describe('ReactInteractionTracing', () => {
return Promise.resolve().then(() => {});
}

// @gate enableTransitionTracing
it(' should not call callbacks when transition is not defined', async () => {
const transitionCallbacks = {
onTransitionStart: (name, startTime) => {
Expand Down Expand Up @@ -227,6 +228,15 @@ describe('ReactInteractionTracing', () => {

// Doesn't call transition or marker code
expect(Scheduler).toFlushAndYield(['Page Two']);

startTransition(() => root.render(<App navigate={false} />), {
name: 'transition',
});
expect(Scheduler).toFlushAndYield([
'Page One',
'onTransitionStart(transition, 2000)',
'onTransitionComplete(transition, 2000, 2000)',
]);
});
});
});
Expand Down

0 comments on commit 5f7c343

Please sign in to comment.