mohsenbostan / nestjs-grpc-exceptions

NestJS gRPC Exceptions Library ⚡️
MIT License
31 stars 11 forks source link

How to run test after pnpm install #9

Closed youngkiu closed 2 months ago

youngkiu commented 3 months ago

Fail

Install

$ pnpm i --frozen-lockfile
Lockfile is up to date, resolution step is skipped
Packages: +602
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 602, reused 601, downloaded 0, added 602, done

devDependencies:
+ @changesets/cli 2.26.0
+ @grpc/grpc-js 1.8.4
+ @nestjs/common 10.1.2
+ @nestjs/core 10.1.2
+ @nestjs/microservices 10.1.2
+ @types/jest 29.2.6
+ @typescript-eslint/eslint-plugin 5.48.2
+ @typescript-eslint/parser 5.48.2
+ eslint 8.32.0
+ eslint-config-prettier 8.6.0
+ eslint-plugin-prettier 4.2.1
+ jest 29.3.1
+ prettier 2.8.3
+ reflect-metadata 0.1.13
+ rxjs 7.8.0
+ ts-jest 29.0.5
+ tsup 6.5.0
+ typescript 4.9.4

Done in 2s

Test

$ pnpm test

> nestjs-grpc-exceptions@0.2.1 test /Users/youngkiu/src/nestjs-grpc-exceptions
> jest --

Test environment found at "/Users/youngkiu/node_modules/jest-environment-node/build/index.js" does not export a "getVmContext" method, which is mandatory from Jest 27. This method is a replacement for "runScript".

 RUNS  test/interceptors/grpc-to-http-interceptor.spec.ts
 ELIFECYCLE  Test failed. See above for more details.

Success

Install

$ npm i

added 804 packages, and audited 805 packages in 56s

137 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Test

$ npm test

> nestjs-grpc-exceptions@0.2.1 test
> jest --

watchman warning:  Recrawled this watch 9 times, most recently because:
MustScanSubDirs UserDroppedTo resolve, please review the information on
https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl
To clear this warning, run:
`watchman watch-del '/Users/youngkiu/src/nestjs-grpc-exceptions' ; watchman watch-project '/Users/youngkiu/src/nestjs-grpc-exceptions'`

 PASS  test/interceptors/grpc-to-http-interceptor.spec.ts
  GrpcToHttpInterceptor
    ✓ Should be defined (3 ms)
    ✓ Should convert gRPC exceptions to Http exceptions (2 ms)
    ✓ Should convert gRPC status code to Http status code (1 ms)
    ✓ Should contain the gRPC exception error message

Test Suites: 1 passed, 1 total
Tests:       4 passed, 4 total
Snapshots:   0 total
Time:        2.491 s
Ran all test suites.