KarmaTestAdapter icon indicating copy to clipboard operation
KarmaTestAdapter copied to clipboard

Does not run tests properly - "Value cannot be null"

Open cidthecoatrack opened this issue 9 years ago • 11 comments

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' }

cidthecoatrack avatar May 09 '15 19:05 cidthecoatrack

Same thing over here, was working fine this morning, but stopped working when I've added more tests.

jValdron avatar Jun 09 '15 13:06 jValdron

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) ==========

andy-maca avatar May 10 '16 01:05 andy-maca

+1

Fresa avatar Jul 06 '16 08:07 Fresa

Did anyone figure out this? I have the same issue over here

sujaykodamala avatar Aug 08 '16 19:08 sujaykodamala

I haven't, personally I just switched to Chutzpah.

jValdron avatar Aug 08 '16 19:08 jValdron

Ditto what @jValdron said - I switched to Chutzpah, and it worked wonderfully, both in Visual Studio and on Travis CI build servers

cidthecoatrack avatar Aug 08 '16 20:08 cidthecoatrack

Chutzpah is not working for me. This is just killing me

sujaykodamala avatar Aug 08 '16 22:08 sujaykodamala

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 .

sujaykodamala avatar Aug 16 '16 18:08 sujaykodamala

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.

abhijoseph avatar Oct 26 '16 18:10 abhijoseph

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

samih-dev avatar Oct 27 '16 13:10 samih-dev

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

ivyfae avatar Dec 07 '16 21:12 ivyfae