Skip to content

Commit

Permalink
Fix bug with duplicate test names starting out at the wrong number.
Browse files Browse the repository at this point in the history
If two tests have the name "foo", the second should appear as "foo_2", but instead it appeared as "foo_3".
  • Loading branch information
0b10011 authored and marijnh committed Sep 10, 2012
1 parent ba11716 commit cde3d17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/driver.js
Expand Up @@ -14,8 +14,8 @@ function test(name, run, expectedFail) {
var originalName = name;
var i = 2; // Second function would be NAME_2
while (indexOf(allNames, name) !== -1){
i++;
name = originalName + "_" + i;
i++;
}
allNames.push(name);
// Add test
Expand Down

0 comments on commit cde3d17

Please sign in to comment.