chore: Setup ts jest

This commit is contained in:
Baptiste Studer 2023-11-14 21:24:49 +01:00
parent 5c86e4f5bc
commit fdd406b14b
5 changed files with 203 additions and 407 deletions

View File

@ -1,11 +1,12 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
testRegex: '(/__tests__/.*|(\\.|/)(test))\\.[jt]sx?$',
fakeTimers: {
enableGlobally: true,
now: new Date('2022-09-01T09:00:00.000+00:00').getTime(),
},
testPathIgnorePatterns: ['/node_modules/', '.tmp', '.cache'],
testEnvironment: 'node',
testTimeout: 30_000,
verbose: true,
};

View File

@ -51,7 +51,9 @@
"@strapi/plugin-users-permissions": "^4.10.5",
"@strapi/strapi": "^4.10.5",
"@types/fs-extra": "^11.0.1",
"@types/jest": "^29.5.8",
"@types/node-fetch": "^2.6.3",
"better-sqlite3": "^9.1.1",
"eslint": "^8.23.0",
"eslint-plugin-jest": "^27.0.1",
"eslint-plugin-react": "^7.30.1",
@ -59,9 +61,9 @@
"jest": "^29.0.2",
"nodemon": "^2.0.22",
"prettier": "^2.7.1",
"sqlite3": "^5.0.11",
"standard-version": "^9.5.0",
"supertest": "^6.2.4",
"ts-jest": "^29.1.1",
"typescript": "^5.0.3"
},
"peerDependencies": {

View File

@ -7,5 +7,6 @@ module.exports = ({ env }) => ({
filename: path.join(__dirname, '..', 'data/data.sqlite'),
},
useNullAsDefault: true,
debug: false,
},
});

602
yarn.lock

File diff suppressed because it is too large Load Diff