Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Weird mocha behavior #63

Closed
timsim00 opened this issue Jul 15, 2015 · 5 comments
Closed

Weird mocha behavior #63

timsim00 opened this issue Jul 15, 2015 · 5 comments

Comments

@timsim00
Copy link
Contributor

Very strange behavior observed with mocha. The order of the test files makes a difference. The issue is around function-soapRequest. I tried putting a new test in there after the 'describe' test but it always resulted in "Error: connect ECONNRESET" in the midst of reporting a test. Also, reporting indicated that certain tests were ran twice. Very strange stuff.

Prefixing a file with _ causes the file to be processed first. This worked for node 0.8x but caused it fail on 0.10x, or vice versa, I don't remember. Some of this may have been my mac. I ended up getting both 0.8 and 0.10 tests to work on another machine. But I had to call it "header-test" so it ran after the other tests.

@dougwilson
Copy link

I can help if you can show a commit where running the tests results in Error: connect ECONNRESET.

@vernak2539
Copy link
Contributor

Also, reporting indicated that certain tests were ran twice

I've experience that also, and it can be seen in a Fuel-REST PR. (the subsequent failures are because that first one failed). The test is actually checking to see if a call is made twice, but it ends up being called 4 times, so that's wrong. I think it has to do with using a mocha version that doesn't support v0.8. Will likely look into that soon.

The order of the test files makes a difference.

This is interesting. Test order shouldn't matter, but seems weird that it does.

@dougwilson
Copy link

I think it has to do with using a mocha version that doesn't support v0.8.

The latest version of mocha still supports Node.js 0.8 (it doesn't support 0.6 or lower, through).

@vernak2539
Copy link
Contributor

Hmm, then I have no clue why it would run them twice. Looks like I'll need to dig into it more

@vernak2539
Copy link
Contributor

not a problem anymore it seems as tests run on 0.8 consistently

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

No branches or pull requests

3 participants