KarmaTestAdapter icon indicating copy to clipboard operation
KarmaTestAdapter copied to clipboard

Test Explorer shows only first 'describe' / 'it' statement

Open andreminelli opened this issue 8 years ago • 1 comments

I have created a single spec file with a single 'describe' call with multiple 'it' calls. It runs fine over Karma CLI, but inside Test Explorer it only reports the first 'it' statement.

I also tried to split each 'it' statement on a single 'describe', all on the same file, but the result is the same (only the first pair is displayed in Test Explorer, but Karma CLI runs fine).

andreminelli avatar Oct 20 '15 16:10 andreminelli

I've encountered the same problem. Only the first describe/it pair shows up, yet all tests run from the command line.

Here's my config:

module.exports = function(config) {
    config.set({
        basePath: '',
        frameworks: ['mocha'],
        files: ['tests/**/*.js'],
        reporters: ['dots'],
        port: 9876,
        browsers: ['PhantomJS'],
        singleRun: true
    });
};

And here's a simple test file (saved as tests/test.js):

describe('first', function () {
    it('a', function () {});
    it('b', function () {});
});

describe('second', function () {
    it('a', function () {});
    it('b', function () {});
});

Visual Studio shows "first a" as the only test result. When running Karma via the CLI, I get Executed 4 of 4 SUCCESS

I've attempted to run the extension via the IDE in an experimental instance of Visual Studio but couldn't work out how to do it (the solution doesn't appear to contain an extension project). Do you have any advice on how to debug the extension? I'm more than happy to help find out what's causing this issue.

reduckted avatar Dec 31 '15 07:12 reduckted