nodeSolidServer/solid-auth-client

npm run test on master fails 16 tests

happybeing opened this issue · 6 comments

Following the README.md instructions below as far as npm run test

$ git clone https://github.com/solid/solid-auth-client.git
$ cd solid-auth-client
$ npm install
$ npm run test     # run the code formatter, linter, and test suite
$ npm run test:dev # just run the tests in watch mode

Here is the summary output for Ubuntu 18.10, npm v6.4.1, node v8.11.3:

-----------------------|----------|----------|----------|----------|-------------------|
File                   |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |
-----------------------|----------|----------|----------|----------|-------------------|
All files              |    79.22 |    74.76 |    91.03 |    78.37 |                   |
 src                   |    78.84 |    74.76 |    93.24 |    77.92 |                   |
  authn-fetch.js       |      100 |       90 |      100 |      100 |                31 |
  host.js              |      100 |      100 |      100 |      100 |                   |
  ipc.js               |    86.67 |    93.33 |       90 |    86.21 |     47,51,102,103 |
  popup.js             |    68.42 |     87.5 |    83.33 |    68.42 |  9,10,11,12,13,14 |
  session.js           |      100 |      100 |      100 |      100 |                   |
  solid-auth-client.js |    58.97 |    55.56 |    85.71 |    58.97 |... 71,72,73,94,95 |
  storage.js           |    88.89 |       80 |      100 |    88.57 |       21,41,42,43 |
  url-util.js          |    91.67 |       25 |      100 |       90 |                17 |
  webid-oidc.js        |    71.43 |    64.29 |     87.5 |    70.15 |... 70,171,172,181 |
 src/__test__          |    85.71 |      100 |       50 |    85.71 |                   |
  session-keys.js      |      100 |      100 |      100 |      100 |                   |
  spec-helpers.js      |    84.62 |      100 |       50 |    84.62 |             17,20 |
-----------------------|----------|----------|----------|----------|-------------------|
Test Suites: 1 failed, 4 passed, 5 total
Tests:       16 failed, 35 passed, 51 total
Snapshots:   0 total
Time:        15.157s
Ran all test suites matching /src/i.

Full test output here:
test.log

NOTE: The demo does work though! As follows:

POPUP_URI='http://localhost:8606/popup-template.html' npm run start:demo

Thanks, Mark. Which failures? CI works.

I've added the full test output as
test.log

Seems like a test configuration problem with Node 8. The library is only tested with Node 10 at the moment. (Compatibility with multiple Node versions is not on the priority list, given that Node just acts as the building and testing system for the browser library.)

OK, I think I can probably go to Node 10 anyway. Thanks. By all means close.

I confirm:

nvm install # uses .nvmrc to install node 10
npm run test

All tests now pass. Worth adding nvm install to README?

Thanks for conforming!

Not everyone uses nvm though. Updated the engines field; might be worth to tell the needed version in the README.