Skip to content

Commit 17dd627

Browse files
committed
chore: add controller tests
Signed-off-by: Shurtu-gal <ashishpadhy1729@gmail.com>
1 parent 71b0da6 commit 17dd627

File tree

7 files changed

+1136
-6
lines changed

7 files changed

+1136
-6
lines changed

package-lock.json

Lines changed: 172 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
"@types/mocha": "^10.0.2",
7474
"@types/node": "^22.13.10",
7575
"@types/rimraf": "^3.0.2",
76+
"@types/supertest": "^6.0.3",
7677
"@types/uuid": "^10.0.0",
7778
"@types/ws": "^8.2.0",
7879
"@typescript-eslint/eslint-plugin": "^5.38.1",
@@ -92,6 +93,7 @@
9293
"nyc": "^15.1.0",
9394
"rimraf": "^3.0.2",
9495
"simple-git": "^3.16.0",
96+
"supertest": "^7.1.4",
9597
"ts-node": "^10.9.1",
9698
"tsc-alias": "^1.8.16",
9799
"tsconfig-paths": "^4.2.0",
@@ -182,9 +184,9 @@
182184
"posttest": "rimraf ./test.asyncapi-cli",
183185
"postinstall": "node ./scripts/enableAutoComplete.js",
184186
"test": "npm run cli:test && npm run action:test",
185-
"cli:test": "cross-env NODE_ENV=development TEST=1 CUSTOM_CONTEXT_FILENAME=\"test.asyncapi-cli\" CUSTOM_CONTEXT_FILE_LOCATION=\"\" nyc --extension .ts mocha --require ts-node/register --require tsconfig-paths/register --require test/helpers/init.js --reporter spec --timeout 100000 \"test/**/*.test.ts\"",
186-
"unit:test": "cross-env NODE_ENV=development TEST=1 CUSTOM_CONTEXT_FILENAME=\"test.asyncapi-cli\" CUSTOM_CONTEXT_FILE_LOCATION=\"\" nyc --extension .ts mocha --require ts-node/register --require tsconfig-paths/register --require test/helpers/init.js --reporter spec --timeout 100000 \"test/unit/**/*.test.ts\"",
187-
"test:one": "cross-env NODE_ENV=development TEST=1 CUSTOM_CONTEXT_FILENAME=\"test.asyncapi-cli\" CUSTOM_CONTEXT_FILE_LOCATION=\"\" nyc --extension .ts mocha --require ts-node/register --require tsconfig-paths/register --require test/helpers/init.js --reporter spec --timeout 100000",
187+
"cli:test": "cross-env NODE_ENV=development TEST=1 CUSTOM_CONTEXT_FILENAME=\"test.asyncapi-cli\" CUSTOM_CONTEXT_FILE_LOCATION=\"\" NODE_CONFIG_DIR=\"./src/apps/api/configs\" nyc --extension .ts mocha --require ts-node/register --require tsconfig-paths/register --require test/helpers/init.js --reporter spec --timeout 100000 \"test/**/*.test.ts\"",
188+
"unit:test": "cross-env NODE_ENV=development TEST=1 CUSTOM_CONTEXT_FILENAME=\"test.asyncapi-cli\" CUSTOM_CONTEXT_FILE_LOCATION=\"\" NODE_CONFIG_DIR=\"./src/apps/api/configs\" nyc --extension .ts mocha --require ts-node/register --require tsconfig-paths/register --require test/helpers/init.js --reporter spec --timeout 100000 \"test/unit/**/*.test.ts\"",
189+
"test:one": "cross-env NODE_ENV=development TEST=1 CUSTOM_CONTEXT_FILENAME=\"test.asyncapi-cli\" CUSTOM_CONTEXT_FILE_LOCATION=\"\" NODE_CONFIG_DIR=\"./src/apps/api/configs\" nyc --extension .ts mocha --require ts-node/register --require tsconfig-paths/register --require test/helpers/init.js --reporter spec --timeout 100000",
188190
"get-version": "echo $npm_package_version",
189191
"createhook": "oclif generate hook myhook --event=command_not_found",
190192
"createhookinit": "oclif generate hook inithook --event=init",

0 commit comments

Comments
 (0)