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

Tests failing and example not working #286

Closed
bragma opened this issue Jan 5, 2017 · 1 comment
Closed

Tests failing and example not working #286

bragma opened this issue Jan 5, 2017 · 1 comment

Comments

@bragma
Copy link

bragma commented Jan 5, 2017

Hi,
I've just cloned the repository and I have problems running tests in a windows command line, some tests fail:

  1. git clone https://github.com/auth0/auth0.js.git
  2. npm install (see below for logs)
  3. npm test (see below for logs - there seem to be some errors)
  4. npm start
  5. Open chrome at http://localhost:3000/example/
    -> I see the example page, but buttons do not work. Nothing happens on the net and no events trigger.
    There is an error on the console:
SW registered
Navigated to http://localhost:3000/example/
(index):65 Uncaught TypeError: Cannot read property 'error' of null
    at HTMLConsole.dumpCallback ((index):65)
    at (index):182
    at WebAuth.parseHash (index.js:110)
    at (index):177
HTMLConsole.dumpCallback @ (index):65
(anonymous) @ (index):182
WebAuth.parseHash @ index.js:110
(anonymous) @ (index):177

Am I missing anything?

NPM INSTALL LOGS:

C:\Devel\auth0.js>npm install
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN prefer global [email protected] should be installed with -g

> [email protected] install C:\Devel\auth0.js\node_modules\execSync
> node install.js

[execsync v1.0.2] Attempting to compile native extensions.
{ Error: spawn node-gyp ENOENT
    at exports._errnoException (util.js:896:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:182:32)
    at onErrorNT (internal/child_process.js:348:16)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
    at Function.Module.runMain (module.js:577:11)
    at startup (node.js:159:18)
    at node.js:444:3
  code: 'ENOENT',
  errno: 'ENOENT',
  syscall: 'spawn node-gyp',
  path: 'node-gyp',
  spawnargs: [ 'rebuild' ] }
[execSync v1.0.2]
    Native code compile failed!!
    Will try to use win32 extension.
[email protected] C:\Devel\auth0.js
+-- [email protected]
+-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| |   `-- [email protected]
| |     `-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | |   `-- [email protected]
| | +-- [email protected]
| | | +-- [email protected]
| | | +-- [email protected]
| | | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | | +-- [email protected]
| | | +-- [email protected]
| | | | +-- [email protected]
| | | | +-- [email protected]
| | | | `-- [email protected]
| | | `-- [email protected]
| | |   +-- [email protected]
| | |   +-- [email protected]
| | |   +-- [email protected]
| | |   +-- [email protected]
| | |   | `-- [email protected]
| | |   +-- [email protected]
| | |   +-- [email protected]
| | |   | `-- [email protected]
| | |   +-- [email protected]
| | |   `-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| `-- [email protected]
+-- [email protected]  (git://github.com/auth0/component-cdn-uploader.git#bcb103056c24c5b873580b22f9dc0d1617ed34db)
| +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | +-- [email protected]
| | | | `-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | +-- [email protected]
| | | +-- [email protected]
| | | `-- [email protected]
| | |   +-- [email protected]
| | |   | `-- [email protected]
| | |   `-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | |   +-- [email protected]
| | |   | +-- [email protected]
| | |   | +-- [email protected]
| | |   | | `-- [email protected]
| | |   | |   `-- [email protected]
| | |   | `-- [email protected]
| | |   `-- [email protected]
| | |     `-- [email protected]
| | +-- [email protected]
| | | +-- [email protected]
| | | | `-- [email protected]
| | | |   `-- [email protected]
| | | `-- [email protected]
| | |   `-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| `-- [email protected]
|   +-- [email protected]
|   | +-- [email protected]
|   | | `-- [email protected]
|   | `-- [email protected]
|   +-- [email protected]
|   +-- [email protected]
|   +-- [email protected]
|   | `-- [email protected]
|   +-- [email protected]
|   +-- [email protected]
|   +-- [email protected]
|   `-- [email protected]
+-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| |   `-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| |   `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| |   +-- [email protected]
| |   +-- [email protected]
| |   | +-- [email protected]
| |   | | `-- [email protected]
| |   | +-- [email protected]
| |   | +-- [email protected]
| |   | | `-- [email protected]
| |   | +-- [email protected]
| |   | `-- [email protected]
| |   +-- [email protected]
| |   `-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | |   +-- [email protected]
| | |   `-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | +-- [email protected]
| | | +-- [email protected]
| | | | `-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| |   `-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| |   `-- [email protected]
| +-- [email protected]
| `-- [email protected]
|   `-- [email protected]
+-- [email protected]
| `-- [email protected]
+-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| |   +-- [email protected]
| |   `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| |   `-- [email protected]
| `-- [email protected]
+-- [email protected]
+-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | | +-- [email protected]
| | | | `-- [email protected]
| | | +-- [email protected]
| | | `-- [email protected]
| | |   `-- [email protected]
| | |     +-- [email protected]
| | |     | +-- [email protected]
| | |     | | `-- [email protected]
| | |     | `-- [email protected]
| | |     `-- [email protected]
| | +-- [email protected]
| | | +-- [email protected]
| | | +-- [email protected]
| | | +-- [email protected]
| | | `-- [email protected]
| | |   +-- [email protected]
| | |   | `-- [email protected]
| | |   |   `-- [email protected]
| | |   |     `-- [email protected]
| | |   +-- [email protected]
| | |   `-- [email protected]
| | |     `-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| `-- [email protected]
|   +-- [email protected]
|   +-- [email protected]
|   | +-- [email protected]
|   | +-- [email protected]
|   | | `-- [email protected]
|   | +-- [email protected]
|   | +-- [email protected]
|   | +-- [email protected]
|   | | `-- [email protected]
|   | |   `-- [email protected]
|   | `-- [email protected]
|   +-- [email protected]
|   | `-- [email protected]
|   |   `-- [email protected]
|   |     +-- [email protected]
|   |     | `-- [email protected]
|   |     +-- [email protected]
|   |     `-- [email protected]
|   |       +-- [email protected]
|   |       `-- [email protected]
|   +-- [email protected]
|   +-- [email protected]
|   | +-- [email protected]
|   | `-- [email protected]
|   +-- [email protected]
|   | `-- [email protected]
|   |   `-- [email protected]
|   `-- [email protected]
|     `-- [email protected]
+-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | | +-- [email protected]
| | | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| |   `-- [email protected]
| |     `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| `-- [email protected]
|   `-- [email protected]
+-- [email protected]
| +-- [email protected]
| +-- [email protected]
| `-- [email protected]
|   `-- [email protected]
+-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| `-- [email protected]
+-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | `-- [email protected]
| |   `-- [email protected]
| |     +-- [email protected]
| |     `-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| |   +-- [email protected]
| |   `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | +-- [email protected]
| | | `-- [email protected]
| | |   +-- [email protected]
| | |   `-- [email protected]
| | |     `-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | +-- [email protected]
| | | +-- [email protected]
| | | | `-- [email protected]
| | | |   `-- [email protected]
| | | +-- [email protected]
| | | | `-- [email protected]
| | | +-- [email protected]
| | | +-- [email protected]
| | | | `-- [email protected]
| | | +-- [email protected]
| | | | `-- [email protected]
| | | +-- [email protected]
| | | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| |   +-- [email protected]
| |   `-- [email protected]
| |     +-- [email protected]
| |     | `-- [email protected]
| |     `-- [email protected]
| |       `-- [email protected]
| `-- [email protected]
+-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| `-- [email protected]
+-- [email protected]
+-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| `-- [email protected]
|   `-- [email protected]
+-- [email protected]
| `-- [email protected]
|   +-- [email protected]
|   +-- [email protected]
|   +-- [email protected]
|   | +-- [email protected]
|   | +-- [email protected]
|   | +-- [email protected]
|   | | `-- [email protected]
|   | +-- [email protected]
|   | +-- [email protected]
|   | +-- [email protected]
|   | | `-- [email protected]
|   | +-- [email protected]
|   | | `-- [email protected]
|   | |   `-- [email protected]
|   | +-- [email protected]
|   | `-- [email protected]
|   |   `-- [email protected]
|   `-- [email protected]
+-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| `-- [email protected]
|   +-- [email protected]
|   +-- [email protected]
|   +-- [email protected]
|   +-- [email protected]
|   `-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| |   `-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | +-- [email protected]
| | | +-- [email protected]
| | | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | `-- [email protected]
| |   `-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| |   +-- [email protected]
| |   +-- [email protected]
| |   | +-- [email protected]
| |   | | +-- [email protected]
| |   | | | +-- [email protected]
| |   | | | `-- [email protected]
| |   | | `-- [email protected]
| |   | +-- [email protected]
| |   | `-- [email protected]
| |   `-- [email protected]
| `-- [email protected]
|   +-- [email protected]
|   +-- [email protected]
|   | +-- [email protected]
|   | | `-- [email protected]
|   | +-- [email protected]
|   | +-- [email protected]
|   | +-- [email protected]
|   | | `-- [email protected]
|   | `-- [email protected]
|   |   +-- [email protected]
|   |   `-- [email protected]
|   `-- [email protected]
+-- [email protected]
| +-- [email protected]
| `-- [email protected]
|   `-- [email protected]
+-- [email protected]
+-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | +-- [email protected]
| | | | `-- [email protected]
| | | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | +-- [email protected]
| | | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | `-- [email protected]
| |   +-- [email protected]
| |   | `-- [email protected]
| |   +-- [email protected]
| |   +-- [email protected]
| |   | +-- [email protected]
| |   | | `-- [email protected]
| |   | |   +-- [email protected]
| |   | |   +-- [email protected]
| |   | |   `-- [email protected]
| |   | +-- [email protected]
| |   | `-- [email protected]
| |   +-- [email protected]
| |   | `-- [email protected]
| |   +-- [email protected]
| |   +-- [email protected]
| |   +-- [email protected]
| |   +-- [email protected]
| |   | `-- [email protected]
| |   +-- [email protected]
| |   +-- [email protected]
| |   | +-- [email protected]
| |   | | `-- [email protected]
| |   | `-- [email protected]
| |   +-- [email protected]
| |   | +-- [email protected]
| |   | `-- [email protected]
| |   `-- [email protected]
| |     +-- [email protected]
| |     `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | `-- [email protected]
| |   `-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | |   `-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | |   `-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| |   `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| `-- [email protected]
|   `-- [email protected]
+-- [email protected]
| +-- [email protected]
| +-- [email protected]
| `-- [email protected]
+-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| `-- [email protected]
`-- [email protected]

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]

NPM TEST LOGS:

C:\Devel\auth0.js>npm test

> [email protected] test C:\Devel\auth0.js
> mocha test/**/*.test.js



  auth0.authentication
    initialization
      √ should check that options is passed
      √ should check that domain is set
      √ should check that clientID is set
    buildAuthorizeUrl
      √ should check that options is valid
      √ should return a url using the default settings
      √ should return a url with connection_scope
      √ should return a url with connection_scope as a string
      √ should return a url using overriding the default settings
    buildAuthorizeUrl with Telemetry
      √ should return a url using overriding the default settings
    buildLogoutUrl
      √ should check that options is valid
      √ should return a url using the default settings
      √ should ignore the clientID
      √ should return a url using overriding the default settings
    buildLogoutUrl with Telemetry
      √ should return a url using overriding the default settings
    userInfo
      √ should call userinfo with the access token
    delegation
`delegation` will be soon deprecated.
      √ should call delegation with all the options
    login
      √ should call oauthToken with all the options
      √ should call oauthToken with all the options
    oauthToken
      √ should allow to login
    getUserCountry
      √ should return the user country code
    getSSOData
`getSSOData` will be soon deprecated.
      √ should call ssodata with all the options
    getSSOData
`getSSOData` will be soon deprecated.
      √ should call ssodata with all the ad options

  auth0.authentication
    dbConnection signup options
      √ should check that options is passed
      √ should check that options.connection is passed
      √ should check that options.email is passed
      √ should check that options.password is passed
      √ should check that cb is valid
    change password options
      √ should check that options is passed
      √ should check that options.connection is passed
      √ should check that options.email is passed
      √ should check that cb is valid

  auth0.authentication
    passwordless start options
      √ should check that options is passed
      √ should check that options.connection is passed
      √ should check that options.type is passed
      √ should check that options.type is valid
      √ should check that cb is valid
      √ should check that email is sent
      √ should check that phoneNumber is sent
    passwordless verify options
      √ should check that options is passed
      √ should check that options.connection is passed
      √ should check that options.type is passed
      √ should check that options.verificationCode is passed
      √ should check that options.type is valid
      √ should check that cb is valid
      √ should check that email is sent
      √ should check that phoneNumber is sent
    passwordless verify
      √ should call passwordless verify sms with all the options
      √ should call passwordless verify email with all the options

  auth0.authentication
    /oauth/ro
`loginWithResourceOwner` will be soon deprecated, user `login` instead.
      √ should call the ro endpoint with all the parameters
`loginWithResourceOwner` will be soon deprecated, user `login` instead.
      √ should handle ro errors
`loginWithResourceOwner` will be soon deprecated, user `login` instead.
      √ should call the ro endpoint overriding the parameters

  helpers assert
    isArray native
      √ should say it is a valid isArray
      √ should say it is NOT a valid isArray
    isArray polyfill
      √ should show an error in the console
      √ should say it is NOT a valid isArray

  helpers cookies
    √ create a cookie with exp
    √ create a cookie without exp
    √ returns null if the cookie does not exist
    √ returns the cookie value
    √ should handle multiple cookies
    √ returns the cookie value (with ;)
    √ should reset the expiration
    √ handle cookie not available

  helpers iframeHandler
    should render the iframe
      √ and hook to the message event (234ms)
      √ and hook to the load event (1084ms)
      √ , hook to the load event and returns an error (214ms)
      √ and hook to the load event (with invalid hash) should timeout (210ms)
      √ and timeout (213ms)
      √ and timeout (without a timeout callback) (105ms)

  helpers
    pick
      √ should return only the requested attributes
      √ should ignore missing keys
    extend
      √ shold merge objects attributes
      √ shold merge objects attributes and override the first object ones
    merge
      √ shold merge without pick
      √ shold merge picking attributes of the base object
      √ shold merge picking attributes of the second object
      √ shold merge picking attributes of both objects
    blacklist
      √ should return all the attributes not blacklisted
    toSnakeCase
      √ should change the casing to all the attributes
      √ should change the casing to all the attributes that are not blacklisted
    toCamelCase
      √ should change the casing to all the attributes
      √ should change the casing to all the attributes that are not blacklisted

  helpers popupHandler
    calculates the window position
      √ should use default values
      √ should use the size from the parameters
    calculates the window position w screen left/top and body client size
      √ should use default values
      √ should use the size from the parameters
    stringifies the window properties
      √ using the options received
    should open the popup
      √ with the correct parametrs
    preload should open the popup
      √ should open the window
      √ should open the window once

  helpers qs
    build
      √ return the formated query string
    parse
      √ return the formated query string
    build and parse
      √ return the formated query string

  helpers random
    randomString with crypto
      √ return the a random string
    randomString with msCrypto
      √ return the a random string
    randomString without crypto
      √ return the a random string

  helpers requestBuilder
    √ should get stuff
    √ should post stuff
    √ should patch stuff

  helpers responseHandler
    √ should return default error
    √ should return normalized format 1
    √ should return normalized format 2
    √ should return normalized format 3
    √ should return normalized format 4
    √ should return normalized format 4
    √ should return the data
    √ should return the data 2

  helpers storage handler
    √ should use localStorage by default
    √ should use cookie storage is localstorage is not available
Error: fail
    at MockLocalStorage.getItem (C:\Devel\auth0.js\test\helper\storage-handler.test.js:10:57)
    at StorageHandler.getItem (C:\Devel\auth0.js\src\helper\storage\handler.js:26:25)
    at Context.<anonymous> (C:\Devel\auth0.js\test\helper\storage-handler.test.js:54:13)
    at callFn (C:\Devel\auth0.js\node_modules\mocha\lib\runnable.js:345:21)
    at Test.Runnable.run (C:\Devel\auth0.js\node_modules\mocha\lib\runnable.js:337:7)
    at Runner.runTest (C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:444:10)
    at C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:550:12
    at next (C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:361:14)
    at C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:371:7
    at next (C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:295:14)
    at Immediate._onImmediate (C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:339:5)
    at tryOnImmediate (timers.js:543:15)
    at processImmediate [as _immediateCallback] (timers.js:523:5)
LocalStorage: failing over CookieStorage
    √ should use cookie storage is localstorage fails with getItem
Error: fail
    at MockLocalStorage.setItem (C:\Devel\auth0.js\test\helper\storage-handler.test.js:12:57)
    at StorageHandler.setItem (C:\Devel\auth0.js\src\helper\storage\handler.js:46:25)
    at Context.<anonymous> (C:\Devel\auth0.js\test\helper\storage-handler.test.js:81:13)
    at callFn (C:\Devel\auth0.js\node_modules\mocha\lib\runnable.js:345:21)
    at Test.Runnable.run (C:\Devel\auth0.js\node_modules\mocha\lib\runnable.js:337:7)
    at Runner.runTest (C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:444:10)
    at C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:550:12
    at next (C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:361:14)
    at C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:371:7
    at next (C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:295:14)
    at Immediate._onImmediate (C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:339:5)
    at tryOnImmediate (timers.js:543:15)
    at processImmediate [as _immediateCallback] (timers.js:523:5)
LocalStorage: failing over CookieStorage
    √ should use cookie storage is localstorage fails with setItem
Error: fail
    at MockLocalStorage.removeItem (C:\Devel\auth0.js\test\helper\storage-handler.test.js:11:60)
    at StorageHandler.removeItem (C:\Devel\auth0.js\src\helper\storage\handler.js:36:25)
    at Context.<anonymous> (C:\Devel\auth0.js\test\helper\storage-handler.test.js:110:13)
    at callFn (C:\Devel\auth0.js\node_modules\mocha\lib\runnable.js:345:21)
    at Test.Runnable.run (C:\Devel\auth0.js\node_modules\mocha\lib\runnable.js:337:7)
    at Runner.runTest (C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:444:10)
    at C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:550:12
    at next (C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:361:14)
    at C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:371:7
    at next (C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:295:14)
    at Immediate._onImmediate (C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:339:5)
    at tryOnImmediate (timers.js:543:15)
    at processImmediate [as _immediateCallback] (timers.js:523:5)
LocalStorage: failing over CookieStorage
    √ should use cookie storage is localstorage fails with removeItem
LocalStorage: failing over CookieStorage
CookieStorage: failing over DummyStorage
DummyStorage: ignore failover
    √ should failover to dummy

  helpers storage
    with localstorage
      √ should store stuff
    without localstorage and with cookies
Error: localStorage not available
    at Object.localStorage.getItem (C:\Devel\auth0.js\test\helper\storage.test.js:47:44)
    at StorageHandler.getItem (C:\Devel\auth0.js\src\helper\storage\handler.js:26:25)
    at Object.module.exports.getItem (C:\Devel\auth0.js\src\helper\storage.js:13:30)
    at Context.<anonymous> (C:\Devel\auth0.js\test\helper\storage.test.js:62:22)
    at callFn (C:\Devel\auth0.js\node_modules\mocha\lib\runnable.js:345:21)
    at Test.Runnable.run (C:\Devel\auth0.js\node_modules\mocha\lib\runnable.js:337:7)
    at Runner.runTest (C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:444:10)
    at C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:550:12
    at next (C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:361:14)
    at C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:371:7
    at next (C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:295:14)
    at Immediate._onImmediate (C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:339:5)
    at tryOnImmediate (timers.js:543:15)
    at processImmediate [as _immediateCallback] (timers.js:523:5)
LocalStorage: failing over CookieStorage
      √ should store stuff
    with dummy storage
Error: cookie storage not available
    at Object.read (C:\Devel\auth0.js\src\helper\cookies.js:32:11)
    at CookieStorage.getItem (C:\Devel\auth0.js\src\helper\storage\cookie.js:7:18)
    at StorageHandler.getItem (C:\Devel\auth0.js\src\helper\storage\handler.js:26:25)
    at Object.module.exports.getItem (C:\Devel\auth0.js\src\helper\storage.js:13:30)
    at Context.<anonymous> (C:\Devel\auth0.js\test\helper\storage.test.js:89:22)
    at callFn (C:\Devel\auth0.js\node_modules\mocha\lib\runnable.js:345:21)
    at Test.Runnable.run (C:\Devel\auth0.js\node_modules\mocha\lib\runnable.js:337:7)
    at Runner.runTest (C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:444:10)
    at C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:550:12
    at next (C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:361:14)
    at C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:371:7
    at next (C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:295:14)
    at Immediate._onImmediate (C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:339:5)
    at tryOnImmediate (timers.js:543:15)
    at processImmediate [as _immediateCallback] (timers.js:523:5)
CookieStorage: failing over DummyStorage
      √ should ignore the data

  helpers warn
    √ should show a warning in the console
    √ should not show a warning in the console

  helpers window
    √ should redirect
    √ should return the window.document object
    √ should return the window object

  auth0.Management
    initialization
      √ should check that options is passed
      √ should check that domain is set
      √ should check that token is set
    getUser options
      √ should check that userId is valid
      √ should check that cb is valid
    getUser
      √ should fetch the user from the api
    patchUserMetadata options
      √ should check that userId is valid
      √ should check that userMetadata is valid
      √ should check that cb is valid
    patchUserMetadata
      √ should fetch the user from the api
    linkUsers options
      √ should check that userId is valid
      √ should check that secondaryUserToken is valid
      √ should check that cb is valid
    linkUsers
      √ should fetch the user from the api

  auth0.WebAuth.popup
    getPopupHandler
      √ should return a new instance
      √ should return not a new instance
    preload should open the popup
      √ should open the window
    authorize
      √ should open the authorize page in a popup
    login
`webauth.popup.loginWithCredentials` will be soon deprecated, use `webauth.client.login` instead.
      √ should do the redirections in the popup
    passwordlessVerify
`loginWithResourceOwner` will be soon deprecated, user `login` instead.
      √ (phone) should do the redirections in the popup
`loginWithResourceOwner` will be soon deprecated, user `login` instead.
      √ (email) should do the redirections in the popup
      √ should propagate the error
    signup and login
`webauth.popup.loginWithCredentials` will be soon deprecated, use `webauth.client.login` instead.
      √ should call db-connection signup with all the options
      √ should propagate signup errors

  auth0.WebAuth.redirect
    signup
      √ should call db-connection signup with all the options
    login
`webauth.redirect.loginWithCredentials` will be soon deprecated, use `webauth.login` instead.
      √ should authenticate the user, render the callback form and submit it
    login
`webauth.redirect.loginWithCredentials` will be soon deprecated, use `webauth.login` instead.
      √ should propagate the error
    signup and login
`webauth.redirect.loginWithCredentials` will be soon deprecated, use `webauth.login` instead.
      √ should call db-connection signup with all the options
      √ should propagate signup errors
    passwordlessVerify
      √ should verify the code and redirect to the passwordless verify page
    passwordlessVerify without telemetry
      √ should verify the code and redirect to the passwordless verify page
    passwordlessVerify with error
      √ should verify the code and redirect to the passwordless verify page
    authenticate
      √ should check that responseType is present
      √ should redirect to authorize
      √ should redirect to logout

  auth0.WebAuth
    nonce validation
      √ should fail if the nonce is not valid
    paseHash
Error: expected 'com.auth0.auth.theState' to equal 'com.auth0.auth.456'
    at Assertion.assert (C:\Devel\auth0.js\node_modules\expect.js\expect.js:99:13)
    at Assertion.be.Assertion.equal (C:\Devel\auth0.js\node_modules\expect.js\expect.js:200:10)
    at Assertion.(anonymous function) [as be] (C:\Devel\auth0.js\node_modules\expect.js\expect.js:73:24)
    at Object.global.window.localStorage.getItem (C:\Devel\auth0.js\test\web-auth\web-auth.test.js:27:24)
    at StorageHandler.getItem (C:\Devel\auth0.js\src\helper\storage\handler.js:26:25)
    at Object.module.exports.getItem (C:\Devel\auth0.js\src\helper\storage.js:13:30)
    at TransactionManager.getStoredTransaction (C:\Devel\auth0.js\src\web-auth\transaction-manager.js:55:29)
    at WebAuth.validateToken (C:\Devel\auth0.js\src\web-auth\index.js:154:41)
    at WebAuth.parseHash (C:\Devel\auth0.js\src\web-auth\index.js:114:10)
    at Context.<anonymous> (C:\Devel\auth0.js\test\web-auth\web-auth.test.js:96:26)
    at callFnAsync (C:\Devel\auth0.js\node_modules\mocha\lib\runnable.js:368:21)
    at Test.Runnable.run (C:\Devel\auth0.js\node_modules\mocha\lib\runnable.js:318:7)
    at Runner.runTest (C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:444:10)
    at C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:550:12
    at next (C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:361:14)
    at C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:371:7
    at next (C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:295:14)
    at Immediate._onImmediate (C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:339:5)
    at tryOnImmediate (timers.js:543:15)
    at processImmediate [as _immediateCallback] (timers.js:523:5)
LocalStorage: failing over CookieStorage
TypeError: Cannot read property 'cookie' of undefined
    at Object.read (C:\Devel\auth0.js\src\helper\cookies.js:30:34)
    at CookieStorage.getItem (C:\Devel\auth0.js\src\helper\storage\cookie.js:7:18)
    at StorageHandler.getItem (C:\Devel\auth0.js\src\helper\storage\handler.js:26:25)
    at StorageHandler.getItem (C:\Devel\auth0.js\src\helper\storage\handler.js:30:17)
    at Object.module.exports.getItem (C:\Devel\auth0.js\src\helper\storage.js:13:30)
    at TransactionManager.getStoredTransaction (C:\Devel\auth0.js\src\web-auth\transaction-manager.js:55:29)
    at WebAuth.validateToken (C:\Devel\auth0.js\src\web-auth\index.js:154:41)
    at WebAuth.parseHash (C:\Devel\auth0.js\src\web-auth\index.js:114:10)
    at Context.<anonymous> (C:\Devel\auth0.js\test\web-auth\web-auth.test.js:96:26)
    at callFnAsync (C:\Devel\auth0.js\node_modules\mocha\lib\runnable.js:368:21)
    at Test.Runnable.run (C:\Devel\auth0.js\node_modules\mocha\lib\runnable.js:318:7)
    at Runner.runTest (C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:444:10)
    at C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:550:12
    at next (C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:361:14)
    at C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:371:7
    at next (C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:295:14)
    at Immediate._onImmediate (C:\Devel\auth0.js\node_modules\mocha\lib\runner.js:339:5)
    at tryOnImmediate (timers.js:543:15)
    at processImmediate [as _immediateCallback] (timers.js:523:5)
CookieStorage: failing over DummyStorage
      √ should parse a valid hash (737ms)
      √ should parse a valid hash from the location.hash
      √ should parse a valid hash without id_token
      √ should fail with an invalid audience
      √ should fail with an invalid issuer
      √ should fail if there is no token
      √ should parse an error response
    renewAuth
      √ should pass the correct authorize url
    login
      √ should check that responseType is present
    renewAuth
      √ should validate the token (818ms)
      √ should return the access_token
      √ should validate the token and fail
    change password
      √ should call db-connection changePassword with all the options
      √ should call db-connection changePassword should ignore password option
    passwordless start
      √ should call passwordless start sms with all the options
      √ should call passwordless start email with all the options
    signup and login
      √ should call db-connection signup with all the options
      √ should propagate signup errors


  175 passing (4s)


C:\Devel\auth0.js>
@glena
Copy link
Contributor

glena commented Jan 5, 2017

Yes there is an error with the console widget. All tests are passing.

I will push the fix later today

@glena glena closed this as completed Jan 5, 2017
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

2 participants