Skip to content

Commit

Permalink
Fix failing unit tests after upgrade to Next.js
Browse files Browse the repository at this point in the history
  • Loading branch information
shaes-farm committed Sep 2, 2023
1 parent 7e0590e commit dbbbb96
Show file tree
Hide file tree
Showing 8 changed files with 1,387 additions and 3,910 deletions.
1 change: 1 addition & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ export default {

// A list of paths to modules that run some code to configure or set up the testing framework before each test
setupFilesAfterEnv: [
'jest-extended/all',
'./src/test-utils/test-setup.ts',
],

Expand Down
5,283 changes: 1,378 additions & 3,905 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/components/Auth/__tests__/PasswordForm.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ describe('PasswordForm', () => {
signUpUrl,
{
locale: undefined,
scroll: undefined,
scroll: true,
shallow: undefined,
}
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/Auth/__tests__/RecoverForm.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ describe('RecoverPasswordForm', () => {
signInUrl,
{
locale: undefined,
scroll: undefined,
scroll: true,
shallow: undefined,
}
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/Auth/__tests__/SignupForm.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ describe('SignupForm', () => {
signInUrl,
{
locale: undefined,
scroll: undefined,
scroll: true,
shallow: undefined,
}
);
Expand Down
1 change: 1 addition & 0 deletions test-setup.d.ts → src/test-utils/test-setup.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'jest-extended';
import type {Faker} from '@faker-js/faker';

declare global {
Expand Down
1 change: 0 additions & 1 deletion src/test-utils/test-setup.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "jest-extended";
import { faker } from '@faker-js/faker';

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
Expand Down
5 changes: 4 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
"skipLibCheck": true /* Skip type checking all .d.ts files. */
},
"include": [
"test-setup.d.ts",
"src/test-utils/test-setup.d.ts",
"src/**/*.ts",
"src/**/*.tsx"
],
Expand All @@ -112,5 +112,8 @@
"jest",
"coverage",
"example"
],
"files": [
"src/test-utils/test-setup.d.ts",
]
}

0 comments on commit dbbbb96

Please sign in to comment.