I'd really like to be using the R#r test running for my javascript unittests. R#r 7 EAP recognizes the tests but when I launch them the runner shows '... Test wasn't run' for all tests.
I can't find any info on what the R#r test runner expects in terms of configuration/directory structure.
Directory structure and sample test posted here
A basic/hardcoded jasmin unit test does work under R#r 7 EAP. This implies that jasmine is baked in to R#r i guess. Have an open question regarding same.
describe('resharper jasmine testrunner', function () {
describe('simplest possible test', function () {
it('should execute', function() {
expect(true).toBe(true);
});
});
});
Got a pointer on the R#r forum that doc comment references are your 'includes' (or jsTestDriver.conf equiv).
/// <reference path="../../libs/testing/jasmine/jasmine.js"/>
/// <reference path="../../libs/crunch/jquery-1.6.2.js"/>
Have yet to get my real tests passing though the now run. Investigating fixture paths next.
I'm not sure how advanced of a solution/structure you're looking for, as I just started looking into this myself, but i have a simple example test "working"*... (using Resharper 7 EAP 7.0.56.103). As far as i know, you can structure your test files anyway/where you want, as long as you include references to all of its dependencies with <reference path="foo/path/file.js" />)
*These pass inside the ReSharper unit tests session window. The browser does not show me any sort of test info but rather a blank screen with some jasmine-related html in the source.
/scripts/cheese.js
function Cheese() {
return {
isGood: true
};
}
/tests/cheeseTest.js
/// <reference path="/scripts/cheese.js"/>
describe('simplest possible test', function() {
var cheese = null;
it('cheese is good', function() {
cheese = new Cheese();
expect(cheese.isGood).toBe(true);
});
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With