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

Failed tests in master branch #763

Closed
3 tasks done
fetis opened this issue May 31, 2018 · 5 comments
Closed
3 tasks done

Failed tests in master branch #763

fetis opened this issue May 31, 2018 · 5 comments

Comments

@fetis
Copy link
Contributor

fetis commented May 31, 2018

Otherwise, create a new issue with the following information:

  • Code snippet or sample project that reproduces the bug
    I'm on the master branch and execute yarn test. I get 3 (sometimes 4) failed test, is it normal or I missed something in dev configuration?
347 passing (9s)
  3 failing

  1) helpers iframeHandler with context should destroy and callback with valid data if an event is valid:
     Uncaught Error: expected { eventListeners: { load: [], message: [] },
  emitEvent: [Function],
  addEventListener: [Function],
  removeEventListener: [Function],
  assimilate: [Function],
  id: 'the_iframe',
  style: { display: 'none' },
  src: undefined } to equal { eventListeners: { load: [], message: [] },
  emitEvent: [Function],
  addEventListener: [Function],
  removeEventListener: [Function],
  assimilate: [Function],
  id: 'the_iframe',
  style: { display: 'none' },
  src: undefined }
      at Assertion.assert (node_modules/expect.js/expect.js:99:13)
      at Assertion.be.Assertion.equal (node_modules/expect.js/expect.js:200:10)
      at Assertion.(anonymous function) [as be] (node_modules/expect.js/expect.js:73:24)
      at Object.removeChild (test/helper/iframe-handler.test.js:91:26)
      at Timeout._onTimeout (src/helper/iframe-handler.js:90:27)

  2) helpers iframeHandler with context should destroy and callback if a timeout occurs:
     Uncaught Error: expected 1 to equal 0
      at Assertion.assert (node_modules/expect.js/expect.js:99:13)
      at Assertion.be.Assertion.equal (node_modules/expect.js/expect.js:200:10)
      at Assertion.(anonymous function) [as be] (node_modules/expect.js/expect.js:73:24)
      at Timeout._onTimeout (test/helper/iframe-handler.test.js:286:78)
      at _combinedTickCallback (internal/process/next_tick.js:135:11)
      at process._tickCallback (internal/process/next_tick.js:180:9)

  3) helpers iframeHandler with context should throw an exception if an invalid eventListernerType is specified:
     TypeError: Attempted to wrap getWindow which is already wrapped
      at checkWrappedMethod (node_modules/sinon/lib/sinon/util/core.js:81:29)
      at Object.wrapMethod (node_modules/sinon/lib/sinon/util/core.js:129:21)
      at stub (node_modules/sinon/lib/sinon/stub.js:67:26)
      at stubWindow (test/helper/iframe-handler.test.js:104:3)
      at Context.<anonymous> (test/helper/iframe-handler.test.js:348:20)
  --------------
  Error: Stack Trace for original
      at Object.wrapMethod (node_modules/sinon/lib/sinon/util/core.js:154:34)
      at stub (node_modules/sinon/lib/sinon/stub.js:67:26)
      at stubWindow (test/helper/iframe-handler.test.js:104:3)
      at Context.<anonymous> (test/helper/iframe-handler.test.js:348:20)
  • Auth0.js version 9.6.0
  • Browser & OS: Node: 8.9.4, macOS 10.13.4 (17E202), yarn 1.7.0

In general, the test environment is very unstable. With yarn test:watch I get 372 passed and fail after timeout OR 90 passed/2 failed and timeout at the end

@fetis fetis changed the title Failed test in master branch Failed tests in master branch May 31, 2018
@luisrudge
Copy link
Contributor

You just have to re-run them. They're very unreliable right now :(

@fetis
Copy link
Contributor Author

fetis commented May 31, 2018

May we keep this open? I think it's connected with #764 because manipulation with global.window in one test may produce side effects for others. I can look into it afterward.

@luisrudge
Copy link
Contributor

luisrudge commented May 31, 2018

You want to fix the unreliability? I know for a fact that these tests fails from time to time because they fail in my machine and in CI as well.

@fetis
Copy link
Contributor Author

fetis commented May 31, 2018

I can look into this. I'm quite sure it's connected to this window issue.

btw, what is your node.js environment for CI, can I use ES6 features in tests?

@luisrudge
Copy link
Contributor

Ok. if you find anything, just open another PR so I can review. Let's keep the issue closed to keep so it doesn't pollute the issues tab.
I'm pretty sure you can write ES6, but we're not using it now for tests yet. I want to convert all tests in one go so we don't have mixed stuff.

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