api: приложение NestJS и e2e-тесты
Каркас api: NestJS со сборкой через webpack, health-контроллер с версией и статусом БД, Dockerfile, тесты Vitest и e2e-тесты на Jest.
This commit is contained in:
1 parent
94e5e09218
commit
94f9b06527
27 files changed
+791
No files matched your search
@@ -0,0 +1,21 @@
|
||||
import { readFileSync } from 'fs';
|
||||
|
||||
// Reading the SWC compilation config for the spec files
|
||||
const swcJestConfig = JSON.parse(readFileSync(`${__dirname}/.spec.swcrc`, 'utf-8'));
|
||||
|
||||
// Disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves
|
||||
swcJestConfig.swcrc = false;
|
||||
|
||||
export default {
|
||||
displayName: 'api-e2e',
|
||||
preset: '../../jest.preset.js',
|
||||
globalSetup: '<rootDir>/src/support/global-setup.ts',
|
||||
globalTeardown: '<rootDir>/src/support/global-teardown.ts',
|
||||
setupFiles: ['<rootDir>/src/support/test-setup.ts'],
|
||||
testEnvironment: 'node',
|
||||
transform: {
|
||||
'^.+\\.[tj]s$': ['@swc/jest', swcJestConfig],
|
||||
},
|
||||
moduleFileExtensions: ['ts', 'js', 'html'],
|
||||
coverageDirectory: 'test-output/jest/coverage',
|
||||
};
|
||||
Reference in new issue
Block a user