|
10 | 10 | "test": "cross-env NODE_ENV=test ENV=test npm run test:all",
|
11 | 11 | "test:integration": "cross-env NODE_ENV=test ENV=test npm run test:_integration",
|
12 | 12 | "test:integration:single": "cross-env NODE_ENV=test ENV=test npm run test:prepare:integration && npm run mocha",
|
13 |
| - "test:unit": "cross-env NODE_ENV=test ENV=test npm run mocha \"src/**/*.test.ts\" --exclude \"src/**/*.integration.test.ts\"", |
| 13 | + "test:unit": "cross-env NODE_ENV=test ENV=test npm run mocha \"test/**/*.test.ts\" --exclude \"test/**/*.integration.test.ts\"", |
14 | 14 | "test:unit:single": "cross-env NODE_ENV=test ENV=test npm run mocha",
|
15 | 15 | "mocha": "cross-env ENV=test mocha --unhandled-rejections=strict",
|
16 | 16 | "eslint": "eslint src --fix",
|
|
25 | 25 | "//1": "/*****************************************************************************",
|
26 | 26 | "//2": "* Rest of those commands are used internally and should not be used directly!",
|
27 | 27 | "//3": "*****************************************************************************/",
|
28 |
| - "prepare-db": "npm run db:seed:up && npm run db:migrate:up", |
| 28 | + "prepare-db": "echo preparing db for $NODE_ENV env && npm run db:seed:up && npm run db:migrate:up", |
29 | 29 | "clean": "rm -rf dist",
|
30 |
| - "db:test:create": "cross-env NODE_ENV=test ENV=test sequelize --config='src/config/database.ci.js' db:create || true", |
31 |
| - "db:test:drop": "cross-env NODE_ENV=test ENV=test sequelize --config='src/config/database.ci.js' db:drop || true", |
| 30 | + "db:test:create": "docker-compose -p gameshq-api-test-project -f 'docker-compose-test.yml' up -d", |
32 | 31 | "test:all": "concurrently --kill-others-on-fail --names *typescript,*****eslint,*tests:unit,integration --prefix-colors blue.inverse,blue,yellow,green 'npm run tsc' 'npm run eslint --quiet' 'npm run test:unit' 'npm run test:integration'",
|
33 |
| - "test:prepare:integration": "npm run db:test:drop && npm run db:test:create && npm run prepare-db", |
34 |
| - "test:_integration": "npm run test:prepare:integration && npm run mocha \"src/**/*.integration.test.ts\"", |
| 32 | + "test:prepare:integration": "npm run db:test:create && cross-env NODE_ENV=test ENV=test npm run prepare-db", |
| 33 | + "test:_integration": "npm run test:prepare:integration && npm run mocha \"test/**/*.integration.test.ts\"", |
35 | 34 | "prepare": "husky install"
|
36 | 35 | },
|
37 | 36 | "author": "X-Team Community",
|
|
0 commit comments