sublime-test-runner
sublime-test-runner copied to clipboard
Don't understand how to use this
I don't even know what Makefile
means, and google says it's some linux thing so I quickly closed the Google tab because I didn't want to know any irrelevant things. I'm a windows person.
I am running my mocha tests using NPM command npm run test-slimer spec
yes, using slimerjs because I must use a headless browser to test my javascript code.
test-slimer
is set to - "slimerjs tests/mocha-phantomjs-core.js tests.html"
How can I run my tests through sublime? my tests.html
file is in the root directory and I want it to run when any file is saved.
Thank you!
I don't know how slimerjs and mocha work together, but assuming you can set it up to provide TAP output to the console, you can override the default test command by going to Preferences > Package Settings > Test Runner > Settings User and writing something like this:
{
"test_command": "npm run test-slimer tap",
}
(all options and their default values are at Preferences > Package Settings > Test Runner > Settings Default)
If your setup doesn't emit TAP output, this plugin should still run your test command, but you won't have in-editor test progress indicator and colored results.
and how does sublime knows when my Slimer tests are completed? it's listening to the TAP file creation/change?
Slimer is a Mozilla kinda headless browser which can run tests (in my opinion is much much easier to deal with than phantomjs)
It reads console output, assuming there is one,and waits for program termination.