Skip to content

2 possible test discovery bugs #6

@scrom

Description

@scrom

These might be in NodeUnit itself but these are worth a look...
Using NodeUnit0.86 with VS2012 Update4 and the NodeUnit VS plugin.

1: Unit tests without space between "function" keyword and (test) param aren't discovered
The 2 tests below are identical except for the space after the word function.
The first won't be discovered (but will show as run on the output)
The second is fine

exports.hiddenTest= function(test) {
test.equal("test0", "test0");
test.done();
};

exports.visibleTest= function (test) {
test.equal("test0", "test0");
test.done();
};

2: Unit tests containing a //comment are not discovered

If a test case contains a // style comment, the test runs in the console but results in:
"Test adapter sent back a result for an unknown test case. Ignoring result for 'aTestCase'."

The test itself doesn't show up in the test explorer. All others are ok.

Replication:
put the following into any working file of test cases...

exports.aTestCase = function(test) {
test.ok(true, "This should always pass.");
//a comment
test.done();
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions