Jasmine test not getting executed when forloop is defined
Followed by 2 people
Hi,
I am unable to get the test case with for loop appear in the resharper unit test panel, rest of the other test cases are appearing correctly. I dont see any logs too.It says "Ignored: Task skipped on timeout."
This is running correctly in the jasmine specrunner.html
describe('Claim StartUp Main Spec', function () {
describe('Testing some characters', function() {
var chars = ['&', '\'', '"', '<', '>'];
for(var i = 0; i < chars.length; i+=1) {
currentChar = chars[i];
it('should reject ' + currentChar, (function(currentChar) {
expect(false).toEqual(false);
})(currentChar));
}
});
});
Thanks
Sajesh
Please sign in to leave a comment.
Hello Sajesh
This unit test is parameterized one, even more, it is not declarative, it is dynamic, that means we need to execute this code to get a list of unit tests. ReSharper does not support parameterized tests at all right now. We have some plans to support such kind of tests, but only declarative ones like https://github.com/kannokanno/jasmine-parameterize or https://github.com/AStepaniuk/qunit-parameterize.
Anyway, I filed a request on YouTrack https://youtrack.jetbrains.com/issue/RSRP-466326, ReSharper should not mark this code as a test since we do not support it.
Thanks!
Any updates on this? Appreciate your response on this.