mirror of
https://github.com/IT4Change/boilerplate-backend.git
synced 2025-12-13 10:25:49 +00:00
unit test coverageto 100%
This commit is contained in:
parent
090972e467
commit
0c76fb4746
@ -4,10 +4,10 @@ module.exports = {
|
|||||||
verbose: true,
|
verbose: true,
|
||||||
preset: 'ts-jest',
|
preset: 'ts-jest',
|
||||||
collectCoverage: true,
|
collectCoverage: true,
|
||||||
collectCoverageFrom: ['src/**/*.ts', '!**/node_modules/**', '!src/seeds/**', '!build/**'],
|
collectCoverageFrom: ['src/**/*.ts', '!**/node_modules/**', '!src/index.ts', '!build/**'],
|
||||||
coverageThreshold: {
|
coverageThreshold: {
|
||||||
global: {
|
global: {
|
||||||
lines: 78,
|
lines: 100,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
setupFiles: ['./test/testSetup.ts'],
|
setupFiles: ['./test/testSetup.ts'],
|
||||||
|
|||||||
@ -1,6 +1,12 @@
|
|||||||
// eslint-disable-next-line import/no-unassigned-import
|
// eslint-disable-next-line import/no-unassigned-import
|
||||||
import 'reflect-metadata'
|
import 'reflect-metadata'
|
||||||
import { main } from './server/server'
|
import { listen } from './server/server'
|
||||||
|
|
||||||
|
export async function main() {
|
||||||
|
await listen(4000)
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
|
console.log('🚀 Server is ready at http://localhost:4000/graphql')
|
||||||
|
}
|
||||||
|
|
||||||
main().catch((e) => {
|
main().catch((e) => {
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
|
|||||||
@ -16,9 +16,3 @@ export async function listen(port: number) {
|
|||||||
|
|
||||||
return app.listen(port)
|
return app.listen(port)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function main() {
|
|
||||||
await listen(4000)
|
|
||||||
// eslint-disable-next-line no-console
|
|
||||||
console.log('🚀 Server is ready at http://localhost:4000/graphql')
|
|
||||||
}
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user