KarmaTestAdapter
KarmaTestAdapter copied to clipboard
Does not run tests properly - "Value cannot be null"
When the javascript tests try to run, I get the following error in the output:
An exception occurred while invoking executor 'executor://karmatestadapter/': One or more errors occurred.
Value cannot be null.
Parameter name: values
[Karma] [Error] [SolutionItems/C:/Users/Andrew Wiggin/Documents/Programming/Projects/BTTiggerWebApp] ERROR [VS Server]: { [Error: write ECONNRESET] code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'write' }
Same thing over here, was working fine this morning, but stopped working when I've added more tests.
I have the same issue in vs with version 1.1.3
------ Run test started ------ An exception occurred while invoking executor 'executor://karmatestadapter/': One or more errors occurred. Value cannot be null. Parameter name: values ========== Run test finished: 141 run (0:00:00.1780102) ==========
+1
Did anyone figure out this? I have the same issue over here
I haven't, personally I just switched to Chutzpah.
Ditto what @jValdron said - I switched to Chutzpah, and it worked wonderfully, both in Visual Studio and on Travis CI build servers
Chutzpah is not working for me. This is just killing me
I found the issue.I followed angular2-quickstart. "systemjs.config.js " file was missing in my case. I added that file .It worked fine for me .
I had the exact same issue, later found out that removing reference to requirejs and karmarequirejs adapter from the files array fixed it. I had those files from node_modules reference which caused the issue Value cannot be null.
I have the same issue, I still get the error but now all tests runs when I moved all specs (it) code above inner describes like so: describe(...,function(){ // it (s) should defined first it(..,function(){}); // describe(...,function(){}); })
hoping this help until this issues fix
This null reference seems to reproduce the error for me (I tried it in a file containing only the code below as well as combined with other tests). It seems like any exception not thrown by a failed assertion just stops the test runner altogether instead of marking it failed.
If I add more tests, it runs all the tests up until this one, but doesn't run the ones after. If I replace x.a
with undefined
the test fails but the runner works fine and executes the rest of the tests.
describe("the thing", () => {
it("should do the impossible", () => {
let x: any;
expect(x.a).toBeDefined();
});
});
describe('the thing', () => {
it('runs this test', () => { })
it('runs this test but doesn\'t report it as failing or passing', () => {
let x: any;
expect(x.a).toBeDefined();
});
it('doesn\'t run this test', () => { });
});
( ✓ ) green the thing runs this test
( ! ) blue runs this test but doesn't report it as failing or passing
( ! ) blue the thing doesn't run this test