qunitjs / js-reporters

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

Fix reporter adding in Jasmine adapter #93

Closed flore77 closed 8 years ago

flore77 commented 8 years ago

This solves the adding of the jasmine adapter in a node env.

We cannot pass the jasmine.env to the reporter, we must pass in the jasmine object, which is a NodeJS helper over jasmine-core. We must use the jasmine.addReporter and not directly jasmine.env.addReporter, because then it will enter on this branch and jasmine will exit and kill the process. Using the jasmine.addReporter has some internal logic that holds from exiting.

Now the adapter has some extra logic to differentiate btw a node env and a browser env. Unfortunately we cannot test the browser part, because currently the tests are running only in a node env.

jzaefferer commented 8 years ago

Looks good, except for failing tests.

Seems like this will need an update as well: https://github.com/js-reporters/js-reporters/pull/90/files#diff-27a1c86133de4310373decfdad200a91R19

flore77 commented 8 years ago

Seems like this will need an update as well: https://github.com/js-reporters/js-reporters/pull/90/files#diff-27a1c86133de4310373decfdad200a91R19

This will be solved in #90, it will be rebased on the master after this pr will be merged.

Good to land? :smiley:

flore77 commented 8 years ago

I set jasmine to the last working version until a version with the fix will be published.