Skip to content

Commit

Permalink
test: Fix test flake (#522)
Browse files Browse the repository at this point in the history
  • Loading branch information
taion committed Aug 30, 2019
1 parent 1a518dd commit a051447
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion test/Router.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe('Router', () => {
{
path: '/foo',
getData: async () => {
await delay(20);
await delay(10);
},
render: () => <div className="foo" />,
},
Expand Down
8 changes: 4 additions & 4 deletions test/render.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('render', () => {
{
path: 'foo',
getComponent: async () => {
await delay(20);
await delay(10);
return ({ children }) => <div className="foo">{children}</div>;
},
children: [
Expand All @@ -40,7 +40,7 @@ describe('render', () => {
const testRenderer = TestRenderer.create(<Router resolver={resolver} />);

// Initial pending render is asynchronous.
await delay(10);
await delay(0);

expect(testRenderer.toJSON()).toMatchInlineSnapshot(`
<div
Expand Down Expand Up @@ -70,7 +70,7 @@ describe('render', () => {
{
path: 'foo',
getComponent: async () => {
await delay(20);
await delay(10);
return ({ nav, main }) => (
<div className="foo">
{nav}
Expand Down Expand Up @@ -113,7 +113,7 @@ describe('render', () => {
const testRenderer = TestRenderer.create(<Router resolver={resolver} />);

// Initial pending render is asynchronous.
await delay(10);
await delay(0);

expect(testRenderer.toJSON()).toMatchInlineSnapshot(`
<div
Expand Down

0 comments on commit a051447

Please sign in to comment.