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

npm test - different tests fail depends on time and permissions #31

Open
alundiak opened this issue Jan 31, 2018 · 0 comments
Open

npm test - different tests fail depends on time and permissions #31

alundiak opened this issue Jan 31, 2018 · 0 comments

Comments

@alundiak
Copy link
Contributor

alundiak commented Jan 31, 2018

npm test:

  NmapScan
    1) runs NMAP
    ✓ accepts space separated command
    ✓ accepts multiple hosts (84ms)
    ✓ returns failure data for bad requests (55ms)

  quickScan
    ✓ scans range of hosts (85ms)
    ✓ returns failure data for bad requests

  osAndPortScan
    2) scans hosts for open ports and OS data
    ✓ returns failure data for bad requests (295ms)


  6 passing (11s)
  2 failing

  1) NmapScan runs NMAP:
     Error: timeout of 10000ms exceeded. Ensure the done() callback is being called in this test.
  

  2) osAndPortScan scans hosts for open ports and OS data:
     Uncaught Error: Unhandled "error" event. (TCP/IP fingerprinting (for OS scan) requires root privileges.
QUITTING!
)
      at ChildProcess.child.on (index.js:194:14)
      at maybeClose (internal/child_process.js:925:16)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)

when I run sudo npm test it goes ok.

My npm ls --depth=1

├─┬ chai@3.5.0
│ ├── assertion-error@1.1.0
│ ├── deep-eql@0.1.3
│ └── type-detect@1.0.0
├─┬ mocha@2.5.3
│ ├── commander@2.3.0
│ ├── debug@2.2.0
│ ├── diff@1.4.0
│ ├── escape-string-regexp@1.0.2
│ ├── glob@3.2.11
│ ├── growl@1.9.2
│ ├── jade@0.26.3
│ ├── mkdirp@0.5.1
│ ├── supports-color@1.2.0
│ └── to-iso-string@0.0.2
├── queued-up@2.0.2
└─┬ xml2js@0.4.19
  ├── sax@1.2.4
  └── xmlbuilder@9.0.4

MacOS v10.13.2
Node v8.9.4
npm v5.6.0
nmap 7.60

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant