Skip to content

Commit 7fae392

Browse files
committed
Refactor: Update test commands
1 parent 5ccc81f commit 7fae392

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ Unit test(with jest mock) for services & resolvers (\*.service.spec.ts & \*.reso
227227
#### Run
228228

229229
```bash
230-
$ yarn test
230+
$ yarn test:unit
231231
```
232232

233233
### Integration Test (Use in-memory DB)
@@ -237,7 +237,7 @@ Integration test(with [pg-mem](https://github.com/oguimbal/pg-mem)) for modules
237237
#### Run
238238

239239
```bash
240-
$ yarn test
240+
$ yarn test:integration
241241
```
242242

243243
### End To End Test (Use docker)

generator/plopfile.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ export default function generator(plop) {
117117
},
118118
{
119119
type: 'add',
120-
path: `${rootPath}/{{${TABLE_NAME}}}/{{${TABLE_NAME}}}.module.spec.ts`,
121-
templateFile: 'templates/module.spec.hbs',
120+
path: `${rootPath}/{{${TABLE_NAME}}}/{{${TABLE_NAME}}}.module.integration.spec.ts`,
121+
templateFile: 'templates/module.integration.spec.hbs',
122122
...(!data[TEST_NEEDED] && {
123123
skip: () => 'skipped',
124124
}),

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
"lint": "eslint \"{src,test}/**/*.ts\" --fix",
2121
"lint:fix": "eslint -c ./eslint.config.mjs \"{src,test}/**/*.ts\" --fix",
2222
"test": "jest",
23+
"test:unit": "jest --testPathPattern='^(?!.*\\.integration\\.spec\\.ts$).*\\.spec\\.ts$'",
24+
"test:integration": "jest --testPathPattern='\\.integration\\.spec\\.ts$'",
2325
"test:watch": "jest --watch",
2426
"test:cov": "jest --coverage",
2527
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
File renamed without changes.

0 commit comments

Comments
 (0)