Skip to content

Commit

Permalink
fix tests due to new error
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Jan 14, 2021
1 parent 9318058 commit 4569bfd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
10 changes: 6 additions & 4 deletions e2e/__tests__/globalSetup.test.ts
Expand Up @@ -71,8 +71,9 @@ test('jest throws an error when globalSetup does not export a function', () => {
]);

expect(exitCode).toBe(1);
expect(stderr).toMatch(
`TypeError: globalSetup file must export a function at ${setupPath}`,
expect(stderr).toContain('Jest: Got error running globalSetup');
expect(stderr).toContain(
`globalSetup file must export a function at ${setupPath}`,
);
});

Expand Down Expand Up @@ -154,8 +155,9 @@ test('globalSetup throws with named export', () => {
]);

expect(exitCode).toBe(1);
expect(stderr).toMatch(
`TypeError: globalSetup file must export a function at ${setupPath}`,
expect(stderr).toContain('Jest: Got error running globalSetup');
expect(stderr).toContain(
`globalSetup file must export a function at ${setupPath}`,
);
});

Expand Down
10 changes: 6 additions & 4 deletions e2e/__tests__/globalTeardown.test.ts
Expand Up @@ -55,8 +55,9 @@ test('jest throws an error when globalTeardown does not export a function', () =
]);

expect(exitCode).toBe(1);
expect(stderr).toMatch(
`TypeError: globalTeardown file must export a function at ${teardownPath}`,
expect(stderr).toContain('Jest: Got error running globalTeardown');
expect(stderr).toContain(
`globalTeardown file must export a function at ${teardownPath}`,
);
});

Expand Down Expand Up @@ -125,7 +126,8 @@ test('globalTeardown throws with named export', () => {
]);

expect(exitCode).toBe(1);
expect(stderr).toMatch(
`TypeError: globalTeardown file must export a function at ${teardownPath}`,
expect(stderr).toContain('Jest: Got error running globalTeardown');
expect(stderr).toContain(
`globalTeardown file must export a function at ${teardownPath}`,
);
});

0 comments on commit 4569bfd

Please sign in to comment.