Skip to content

Commit

Permalink
Run pretest scripts before test migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
ae2079 committed Jul 31, 2024
1 parent c0e9ce3 commit ed56844
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,18 @@
"swagger": "tsoa spec",
"prebuild": "npm run swagger",
"start": "NODE_ENV=development ts-node-dev --project ./tsconfig.json --respawn ./src/index.ts",
"test": "NODE_ENV=test mocha -t 30000 --exit -r ts-node/register ./test/pre-test-scripts.ts ./src/**/*.test.ts ./src/**/**/*.test.ts",
"test:notificationRepository": "NODE_ENV=test mocha -t 30000 --exit -r ts-node/register ./test/pre-test-scripts.ts ./src/repositories/notificationRepository.test.ts ",
"test:notificationSettingRepository": "NODE_ENV=test mocha -t 30000 --exit -r ts-node/register ./test/pre-test-scripts.ts ./src/repositories/notificationSettingRepository.test.ts ",
"test": "NODE_ENV=test mocha -t 30000 --exit -r ts-node/register ./test/pre-test-scripts.ts ./src/**/*.test.ts ./src/**/**/*.test.ts",
"test:notificationRepository": "NODE_ENV=test mocha -t 30000 --exit -r ts-node/register ./test/pre-test-scripts.ts ./src/repositories/notificationRepository.test.ts",
"test:notificationSettingRepository": "NODE_ENV=test mocha -t 30000 --exit -r ts-node/register ./test/pre-test-scripts.ts ./src/repositories/notificationSettingRepository.test.ts",
"lint": "eslint",
"lint:fix": "eslint --fix",
"prettify": "prettier --write '**/*.ts*'",
"prettify": "prettier --write '**/*.ts*'",
"db:setup:test": "ts-node -r tsconfig-paths/register ./test/pre-test-scripts.ts",
"db:migrate:run:local": "NODE_ENV=development ts-node -r tsconfig-paths/register ./node_modules/typeorm/cli.js migration:run -d ./src/dataSource.ts",
"db:migrate:run:staging": "NODE_ENV=staging ts-node -r tsconfig-paths/register ./node_modules/typeorm/cli.js migration:run -d ./src/dataSource.ts",
"db:migrate:revert:local": "NODE_ENV=development ts-node -r tsconfig-paths/register ./node_modules/typeorm/cli.js migration:revert -d ./src/dataSource.ts",
"db:migrate:run:test": "NODE_ENV=test ts-node -r tsconfig-paths/register ./node_modules/typeorm/cli.js migration:run -d ./src/dataSource.ts",
"db:migrate:revert:test": "NODE_ENV=test ts-node -r tsconfig-paths/register ./node_modules/typeorm/cli.js migration:revert -d ./src/dataSource.ts",
"db:migrate:run:test": "npm run db:setup:test && NODE_ENV=test ts-node -r tsconfig-paths/register ./node_modules/typeorm/cli.js migration:run -d ./src/dataSource.ts",
"db:migrate:revert:test": "npm run db:setup:test && NODE_ENV=test ts-node -r tsconfig-paths/register ./node_modules/typeorm/cli.js migration:revert -d ./src/dataSource.ts",
"start:server:staging": "npm run db:migrate:run:staging && cd dist && pm2-runtime src/index.js",
"db:migrate:run:production": "NODE_ENV=production ts-node -r tsconfig-paths/register ./node_modules/typeorm/cli.js migration:run -d ./src/dataSource.ts",
"start:server:production": "npm run db:migrate:run:production && cd dist && pm2-runtime src/index.js"
Expand Down

0 comments on commit ed56844

Please sign in to comment.