qunitjs / js-reporters

📋 Common Reporter Interface (CRI) for JavaScript testing frameworks.
MIT License
60 stars 18 forks source link

Mocha adapter #46

Closed flore77 closed 8 years ago

flore77 commented 8 years ago

The tests are passing so it should be good :smiley:

It is ok to call Mocha twice, because on first run, Mocha uses it's default html reporter, and then when we are passing it to our adapter, it is overriding the html reporter.

Now I was checking for race conditions, it seems mocha runs them in parallel, so it should be fine.

jzaefferer commented 8 years ago

Can you add a comment to the code, to include that explanation?

flore77 commented 8 years ago

Sure, I was thinking about that too.

And what I do mean through runs them in parallel, is that mocha runs them independently in parallel, with help of different processes. But now this is happening when used from command line, I'm not sure, when it is used programmatic. @jzaefferer Should I investigate a little more ?

jzaefferer commented 8 years ago

I think we can land this and investigate that separately. Would be nice to be able to add a reporter, instead of replacing the existing one.

Is there anything else left to do here? Up to date with master?

jzaefferer commented 8 years ago

Now that #41 landed, can you rebase and update this, to make use of the external events module as well?

flore77 commented 8 years ago

@jzaefferer done.

jzaefferer commented 8 years ago

Two more things:

  1. Let's add npm run build to the test script, otherwise we may run tests against an outdated built file.
  2. Extend the integration tests with the mocha adapter
flore77 commented 8 years ago

@jzaefferer finished. I add a pretest script, which calls the building script before actual testing.

flore77 commented 8 years ago

I used absolute paths for Mocha and QUnit, but for Jasmine it does not work.

flore77 commented 8 years ago

Strange, I don't know how fe37573 has passed, there should have been 2 linting errors.

jzaefferer commented 8 years ago

Alright, landed! I did the Object.keys fix, along with a cleanup of some source comments, in 255209e8011bb7bddbd38da19fcf64bdb6f8f7ad