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

2 tests fail #1095

Closed
joeynimu opened this issue Apr 19, 2016 · 11 comments
Closed

2 tests fail #1095

joeynimu opened this issue Apr 19, 2016 · 11 comments
Labels

Comments

@joeynimu
Copy link

joeynimu commented Apr 19, 2016

Hi,

When i ran the tests i get two tests failing as below;

122 passing (716ms)
  2 failing

  1) ParsleyForm should send submit button values, even for async validations:

      Error: expected [] to sort of equal [ 'other' ]
      + expected - actual

      -[]
      +[
      +  "other"
      +]

      at Assertion.assert (node_modules/expect.js/index.js:96:13)
      at Assertion.eql (node_modules/expect.js/index.js:230:10)
      at Context.<anonymous> (test/unit/form.js:131:25)

  2)  "after each" hook for "should handle validators returning promises":
     Error: expected 1 to equal 0
      at Assertion.assert (node_modules/expect.js/index.js:96:13)
      at Assertion.be.Assertion.equal (node_modules/expect.js/index.js:216:10)
      at Assertion.(anonymous function) [as be] (node_modules/expect.js/index.js:69:24)
      at Context.<anonymous> (test/setup/expect_warning.js:7:46)



[11:37:14] 'test' errored after 2.87 s
[11:37:14] Error in plugin 'gulp-mocha'
Message:
    2 tests failed.
@marcandre
Copy link
Collaborator

This particular test fails on Travis too. It passes on my machine, as well as in Chrome, Firefox, Safari.

I don't know why it fails on Travis and on your setup (which is?). If you do find out, let me know!

You can set the env variable 'Travis' to anything and that test will not run.

Unless someone comes up with an explanation, I will close this.

@guillaumepotier
Copy link
Owner

This could be quite problematic since users submitting PR here cannot be sure what they are submitting is failing because of Travis/env config or because of their code. Furthermore, this is more reassuring to have tests passing on Travis and viewable by everyone rather than just on one specific developper laptop.

I think this open should be re-opened and ask for help on that one with Travis experts.

@marcandre marcandre reopened this Apr 19, 2016
@marcandre
Copy link
Collaborator

No problem, let's keep it open. I am just not investigating it. Might not be a travis issue per say, but some strange interraction of simple-jsdom, jquery and/or node.
@guillaumepotier do you know someone who's up for that challenge?

@marcandre
Copy link
Collaborator

Happy to report that a clean install gives the error for me too so I can now try to understand what's going on.

@benjaminpick
Copy link

The tests do not update locally (e.g. if I add failing tests), maybe this is because gulp says gulp-notify: [Gulp notification] JSCS failed ?

@marcandre
Copy link
Collaborator

Looks like a bad interaction with jQuery (2.2.0) and simpleJSDom.

I've tweaked the package.json file to exclude 2.2.0+ (even though it works in the browser) for now.

I'll keep open as it would be nice to isolate and report that bug to simpleJSDom (or jQuery?)

@marcandre
Copy link
Collaborator

Ok, no need to investigate, a more recent version of jsdom fixes this. It does require a more recent version of node, but otherwise should be all good now.

@jamesplease
Copy link

@marcandre , you were using a really old simple-jsdom, which is why your jsdom version was so old.

Instead of fc27638, you could have just bumped the simple-jsdom version to 2.0.0.

- "simple-jsdom": "0.0.2",
+ "simple-jsdom": "2.0.0",

@benjaminpick
Copy link

@jmeas Thanks for this workaround, then I don't have to install node 0.12 ...

@marcandre
Copy link
Collaborator

lol, sorry, I should not have locked the version in my package.json...

@jamesplease
Copy link

Heh, no worries. It's tough to keep up with the versions of everything! I release major versions to simple-jsdom whenever jsdom has breaking changes, so that folks with more lenient version specifications don't get errors for the opposite reason that this issue was erroring :P

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

No branches or pull requests

5 participants