On a new generation, running
npm run test fails
Also noticed that the test command doesnt set the env to "test" so i changed it to "test": "cross-env NODE_ENV=test jest --forceExit --detectOpenHandles",
Version to Reproduce (현재 사용한 버전)
9.2.0
Steps to Reproduce (재현 순서)
Generate new typegoose template, run npm run test
Expected Behavior (예상 동작)
Test passed
Actual Behavior (실제 동작)
FAIL src/tests/users.test.ts
● Test suite failed to run
src/tests/users.test.ts:16:60 - error TS2339: Property 'users' does not exist on type 'UserService'.
16 const users = usersRoute.usersController.userService.users;
~~~~~
src/tests/users.test.ts:47:60 - error TS2339: Property 'users' does not exist on type 'UserService'.
47 const users = usersRoute.usersController.userService.users;
~~~~~
src/tests/users.test.ts:69:60 - error TS2339: Property 'users' does not exist on type 'UserService'.
69 const users = usersRoute.usersController.userService.users;
~~~~~
src/tests/users.test.ts:93:60 - error TS2339: Property 'users' does not exist on type 'UserService'.
93 const users = usersRoute.usersController.userService.users;
~~~~~
src/tests/users.test.ts:120:60 - error TS2339: Property 'users' does not exist on type 'UserService'.
120 const users = usersRoute.usersController.userService.users;
Test Suites: 2 failed, 1 passed, 3 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: 3.87 s, estimated 4 s
Ran all test suites.
Describe the Bug (버그 설명)
On a new generation, running
npm run test
fails Also noticed that the test command doesnt set the env to "test" so i changed it to"test": "cross-env NODE_ENV=test jest --forceExit --detectOpenHandles",
Version to Reproduce (현재 사용한 버전)
9.2.0
Steps to Reproduce (재현 순서)
Generate new typegoose template, run npm run test
Expected Behavior (예상 동작)
Test passed
Actual Behavior (실제 동작)