mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Merge pull request #440 from Aashish-Upadhyay-101/aashish/backend-test-setup
test setup
This commit is contained in:
9
backend/jest.config.ts
Normal file
9
backend/jest.config.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export default {
|
||||
preset: 'ts-jest',
|
||||
testEnvironment: 'node',
|
||||
collectCoverageFrom: ['src/*.{js,ts}', '!**/node_modules/**'],
|
||||
modulePaths: ['<rootDir>/src'],
|
||||
testMatch: ['<rootDir>/tests/**/*.test.ts'],
|
||||
setupFiles: ['<rootDir>/test-resources/env-vars.js'],
|
||||
setupFilesAfterEnv: ['<rootDir>/tests/setupTests.ts']
|
||||
};
|
||||
@@ -101,17 +101,6 @@
|
||||
"ts-jest": "^29.0.3",
|
||||
"ts-node": "^10.9.1"
|
||||
},
|
||||
"jest": {
|
||||
"preset": "ts-jest",
|
||||
"testEnvironment": "node",
|
||||
"collectCoverageFrom": [
|
||||
"src/*.{js,ts}",
|
||||
"!**/node_modules/**"
|
||||
],
|
||||
"setupFiles": [
|
||||
"<rootDir>/test-resources/env-vars.js"
|
||||
]
|
||||
},
|
||||
"jest-junit": {
|
||||
"outputDirectory": "reports",
|
||||
"outputName": "jest-junit.xml",
|
||||
|
||||
5
backend/tests/example.test.ts
Normal file
5
backend/tests/example.test.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { it, expect } from '@jest/globals';
|
||||
|
||||
it('should return true', () => {
|
||||
expect(true).toBeTruthy();
|
||||
});
|
||||
@@ -18,4 +18,4 @@ describe('Healthcheck endpoint', () => {
|
||||
const res = await request(server).get('/healthcheck');
|
||||
expect(res.status).toEqual(200);
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user