MortenHoustonLudvigsen / KarmaTestAdapter

A Visual Studio test explorer adapter for Karma
MIT License
20 stars 14 forks source link

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

Open andreminelli opened 9 years ago

andreminelli commented 9 years ago

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

reduckted commented 8 years ago

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.