opentelemetry-js icon indicating copy to clipboard operation
opentelemetry-js copied to clipboard

Not able to run Unit Tests

Open imtavish04 opened this issue 1 year ago • 1 comments
trafficstars

Hi,

I am trying to run UT for @opentelemetry/[email protected] by using "npm --prefix api/ run test" command but somehow I am getting the following error->

[root@2858b9d61859 opentelemetry-js]# npm --prefix api/ run test
npm WARN config `_auth`, `_authToken`, `username` and `_password` must be scoped to a registry. see `npm help npmrc` for more information.

> @opentelemetry/[email protected] test
> nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'

node:events:491....] - : timing config:load:flatten Completed in 4ms
      throw er; // Unhandled 'error' event
      ^

Error: spawn ts-mocha ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:285:19)
    at onErrorNT (node:internal/child_process:485:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
    at onErrorNT (node:internal/child_process:485:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn ts-mocha',
  path: 'ts-mocha',
  spawnargs: [ '-p', 'tsconfig.json', 'test/**/*.test.ts' ]
}
`

```


Please let me know if I am doing something wrong here.

imtavish04 avatar Jun 13 '24 09:06 imtavish04