Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit Tests are failing for @hapi/inert@7.1.0 #172

Closed
dgarg9992 opened this issue Jun 17, 2024 · 3 comments
Closed

Unit Tests are failing for @hapi/inert@7.1.0 #172

dgarg9992 opened this issue Jun 17, 2024 · 3 comments
Assignees
Labels
support Questions, discussions, and general support

Comments

@dgarg9992
Copy link

dgarg9992 commented Jun 17, 2024

Runtime

node.js

Runtime version

16.20.2

Module version

7.1.0

Used with

No response

Any other relevant information

Hi,

I am trying to run UT for @hapi/inert@7.1.0 by using "npm run test" command but 5 test cases are failing.
please find the output below ->

[root@8f9cbe1f6058 inert]# npm run test
npm WARN config `_auth`, `_authToken`, `username` and `_password` must be scoped to a registry. see `npm help npmrc` for more information.

> @hapi/inert@7.1.0 test
> lab -f -a @hapi/code -t 100 -L -Y

[..................] - : timing config:load:flatten Completed in 4ms

......[..................] - : timing config:load:flatten Completed in 4ms
.....[..................] - : timing config:load:flatten Completed in 4ms
......[..................] - : timing config:load:flatten Completed in 4ms
[..................] - : timing config:load:flatten Completed in 4ms

Failed tests:

  62) directory handler() returns a 403 when missing file read permission:

      actual expected

      200403

      Expected 200 to equal specified value: 403

      at /root/inert/test/directory.js:767:39

  104) file handler() closes file handlers when not reading file stream:

      spawn lsof 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)

  105) file handler() closes file handlers when not using a manually open file stream:

      spawn lsof 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)

  124) file handler() returns a 403 when missing file read permission:

      actual expected

      200403

      Expected 200 to equal specified value: 403

      at /root/inert/test/file.js:1166:40

  126) file handler() has not leaked file descriptors:

      spawn lsof 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)


5 of 160 tests failed
Test duration: 1645 ms
Assertions count: 471 (verbosity: 2.94)
Leaks: No issues
Coverage: 99.42% (3/521)
lib/fs.js missing coverage on line(s): 41-43
Code coverage below threshold: 99.42 < 100
Lint: No issues
Types: No issues

please let me know How can I fix this.

@dgarg9992 dgarg9992 added the support Questions, discussions, and general support label Jun 17, 2024
@dgarg9992 dgarg9992 changed the title Not able to run Unit Tests Unit Tests Failed Jun 17, 2024
@dgarg9992 dgarg9992 changed the title Unit Tests Failed Unit Tests are failing for @hapi/inert@7.1.0 Jun 17, 2024
@Marsup
Copy link
Contributor

Marsup commented Jun 17, 2024

Must be something on your system or a bad modules install, the CI is working perfectly fine. The warnings at the start and the logs during the tests are absolutely not normal.

@kanongil
Copy link
Contributor

My guess is this is run on an unsupported platform.

@Marsup Marsup self-assigned this Jun 19, 2024
@Marsup
Copy link
Contributor

Marsup commented Jun 19, 2024

Closing for inactivity, reopen if you find more elements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Questions, discussions, and general support
Projects
None yet
Development

No branches or pull requests

3 participants