Skip to content

Commit

Permalink
feat(be): apply test coverage (#1637)
Browse files Browse the repository at this point in the history
  • Loading branch information
jspark2000 authored Apr 11, 2024
1 parent 22fd6cd commit ece6da8
Show file tree
Hide file tree
Showing 4 changed files with 352 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,7 @@ go.work

# PEM-encoded certificate data
*.pem

# nyc files
.nyc_output
coverage
8 changes: 8 additions & 0 deletions apps/backend/.nycrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "@istanbuljs/nyc-config-typescript",
"all": true,
"check-coverage": true,
"include": ["{apps,libs}/**/*.{service,resolver}.ts"],
"exclude": ["**/*.spec.ts"],
"reporter": ["lcov", "text"]
}
4 changes: 4 additions & 0 deletions apps/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"test": "pnpm run pretest && cross-env DATABASE_URL=$TEST_DATABASE_URL mocha \"*/**/*.spec.ts\"",
"test:watch": "pnpm run pretest && cross-env DATABASE_URL=$TEST_DATABASE_URL mocha --watch \"*/**/*.spec.ts\"",
"test:debug": "pnpm run pretest && cross-env DATABASE_URL=$TEST_DATABASE_URL mocha --inspect \"*/**/*.spec.ts\"",
"test:coverage": "nyc npm run test",
"studio": "npx prisma studio",
"studio:test": "cross-env DATABASE_URL=$TEST_DATABASE_URL npx prisma studio"
},
Expand Down Expand Up @@ -79,6 +80,7 @@
},
"devDependencies": {
"@faker-js/faker": "^8.4.1",
"@istanbuljs/nyc-config-typescript": "^1.0.2",
"@nestjs/cli": "^10.3.2",
"@nestjs/schematics": "^10.1.1",
"@nestjs/testing": "^10.3.5",
Expand All @@ -96,10 +98,12 @@
"chai": "^4.4.1",
"chai-as-promised": "^7.1.1",
"mocha": "^10.3.0",
"nyc": "^15.1.0",
"prisma": "^5.11.0",
"prisma-nestjs-graphql": "^20.0.2",
"proxyquire": "^2.1.3",
"sinon": "^17.0.1",
"source-map-support": "^0.5.21",
"ts-loader": "^9.5.1",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
Expand Down
Loading

0 comments on commit ece6da8

Please sign in to comment.