Skip to content

Commit 1842760

Browse files
committed
test(auth): fix jest config
1 parent 150a3fc commit 1842760

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

packages/core/auth-js/test/GoTrueClient.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1817,6 +1817,7 @@ describe('GoTrueClient with storageisServer = true', () => {
18171817
let warnings: any[][] = []
18181818

18191819
beforeEach(() => {
1820+
warnings = []
18201821
console.warn = (...args: any[]) => {
18211822
console.log('WARN', ...args)
18221823

packages/core/auth-js/test/jest.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ module.exports = {
33
testEnvironment: 'node',
44
// Use local Prettier v2 for consistent inline snapshot formatting across Jest 29
55
prettierPath: require.resolve('prettier'),
6+
transform: {
7+
'^.+\\.tsx?$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.test.json' }],
8+
},
69
collectCoverage: true,
710
coverageDirectory: 'test/coverage',
811
coverageReporters: ['json', 'html', 'lcov'],
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"include": ["src", "test"],
4+
"compilerOptions": {
5+
"rootDir": ".",
6+
"outDir": "dist/test"
7+
}
8+
}
9+
10+

0 commit comments

Comments
 (0)