learn-co / learn-test

⚠️ This gem is no longer maintained & its web features are no longer available
MIT License
3 stars 29 forks source link

Add Karma Strategy #13

Closed joshrowley closed 8 years ago

joshrowley commented 8 years ago

Adds karma support.

It was tricky getting the karma results to output to JSON. Karma does not support this out of the box, so I had to find a plugin karma-json-reporter to output a .results.json file that learn-test can pick up and submit back to learn. Problem is that karma plugins are installed locally into the lab repos themselves and configured through the lab's karma.conf.js files as a standalone npm module, so I had to run karma through a proxy conf module inside of learn test that loads the lab's conf and adds the json reporter to the config and resets the base path back to the lab's path instead of learn-test's path.

protractor is this branch's parent branch and that hasn't been merged in yet, so this PR is dependent on that one getting into master first. Once that's in, the protractor related commits will no longer be in this PR and it'll be easier to evaluate this strategy on its own.

This also still needs to have the results implementation cleaned up before merge.