visual-studio-2013typescriptwallaby.js

Wallaby.js code coverage indicators only show in test file


I'm trialing Wallaby.js using VS2013. I've got it running for one test class, lets call it queueTests.ts, which covers the class queue.ts. The tests run and pass (or fail if I break them) and it's pretty cool.

The problem I have is that in the queue.ts file I do not see any code coverage indicators in the left hand margin. I do see them in queueTests.ts file. I guess I've got some configuration wrong but I can't work it out. In queue.ts I do see the little angle bracket indicator at the end of the line my cursor is on and it changes state as the tests pass and fail.

Here is my config. It is a solution item because me code and tests are in different projects.

module.exports = function(w) {

    return {
        files: [
            // lib files
            { pattern: "./path/Scripts/jquery-1.9.1.js", load: true, instrument: false },
            { pattern: "./path/Scripts/underscore.js", load: true, instrument: false },

            // references
            { pattern: "./path/refernencedfile.ts", load: true, instrument: true },
            { pattern: "./path/anotherrefencedfile.ts", load: true, instrument: true },

            // class under test
            { pattern: "./path/path2/Queue.ts", load: true, instrument: true },

            // test helpers
            { pattern: "./Tests/TestSupport/**/*.ts", load: true, instrument: false }
        ],

        tests: [
            "./Tests/path2/queuetests.ts"
        ],

        compilers: {
            "**/*.ts": w.compilers.typeScript({ orderFilesByReferenceComments: true })
        }
    };
};

Solution

  • Try removing ./ from all of your paths in wallaby config.