fixed test paths
Showing
1 changed file
with
15 additions
and
11 deletions
... | @@ -27,16 +27,20 @@ t.assert(t.testEquals(function(x){return x;}, function(x){return x;}), 'Tester.t | ... | @@ -27,16 +27,20 @@ t.assert(t.testEquals(function(x){return x;}, function(x){return x;}), 'Tester.t |
27 | t.assertNot(t.testEquals(function(x){return x;}, function(y){return y+2;}), 'Tester.testEquals() function inequality'); | 27 | t.assertNot(t.testEquals(function(x){return x;}, function(y){return y+2;}), 'Tester.testEquals() function inequality'); |
28 | 28 | ||
29 | t.comment('Tester.sortFiles()'); | 29 | t.comment('Tester.sortFiles()'); |
30 | var files = t.findTestFiles(fs.pathJoin(phantom.casperPath, 'tests', 'testdir')); | 30 | var testDirRoot = fs.pathJoin(phantom.casperPath, 'tests', 'testdir'); |
31 | t.assertEquals(files, [ | 31 | var files = t.findTestFiles(testDirRoot); |
32 | "/Users/niko/Sites/casperjs/tests/testdir/01_a/abc.js", | 32 | var expected = [ |
33 | "/Users/niko/Sites/casperjs/tests/testdir/01_a/def.js", | 33 | "01_a/abc.js", |
34 | "/Users/niko/Sites/casperjs/tests/testdir/02_b/ABC.js", | 34 | "01_a/def.js", |
35 | "/Users/niko/Sites/casperjs/tests/testdir/02_b/abc.js", | 35 | "02_b/ABC.js", |
36 | "/Users/niko/Sites/casperjs/tests/testdir/03_a.js", | 36 | "02_b/abc.js", |
37 | "/Users/niko/Sites/casperjs/tests/testdir/03_b.js", | 37 | "03_a.js", |
38 | "/Users/niko/Sites/casperjs/tests/testdir/04/01_init.js", | 38 | "03_b.js", |
39 | "/Users/niko/Sites/casperjs/tests/testdir/04/02_do.js" | 39 | "04/01_init.js", |
40 | ], 'findTestFiles() find test files and sort them'); | 40 | "04/02_do.js" |
41 | ].map(function(entry) { | ||
42 | return fs.pathJoin(testDirRoot, entry); | ||
43 | }); | ||
44 | t.assertEquals(files, expected, 'findTestFiles() find test files and sort them'); | ||
41 | 45 | ||
42 | t.done(); | 46 | t.done(); | ... | ... |
-
Please register or sign in to post a comment