Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
casperjs
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
6a2e5f33
...
6a2e5f3372f4e5757202293e28b57f624cf5d6e6
authored
2012-03-08 07:55:54 +0100
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed test paths
1 parent
19fb42e9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
11 deletions
tests/suites/tester.js
tests/suites/tester.js
View file @
6a2e5f3
...
...
@@ -27,16 +27,20 @@ t.assert(t.testEquals(function(x){return x;}, function(x){return x;}), 'Tester.t
t
.
assertNot
(
t
.
testEquals
(
function
(
x
){
return
x
;},
function
(
y
){
return
y
+
2
;}),
'Tester.testEquals() function inequality'
);
t
.
comment
(
'Tester.sortFiles()'
);
var
files
=
t
.
findTestFiles
(
fs
.
pathJoin
(
phantom
.
casperPath
,
'tests'
,
'testdir'
));
t
.
assertEquals
(
files
,
[
"/Users/niko/Sites/casperjs/tests/testdir/01_a/abc.js"
,
"/Users/niko/Sites/casperjs/tests/testdir/01_a/def.js"
,
"/Users/niko/Sites/casperjs/tests/testdir/02_b/ABC.js"
,
"/Users/niko/Sites/casperjs/tests/testdir/02_b/abc.js"
,
"/Users/niko/Sites/casperjs/tests/testdir/03_a.js"
,
"/Users/niko/Sites/casperjs/tests/testdir/03_b.js"
,
"/Users/niko/Sites/casperjs/tests/testdir/04/01_init.js"
,
"/Users/niko/Sites/casperjs/tests/testdir/04/02_do.js"
],
'findTestFiles() find test files and sort them'
);
var
testDirRoot
=
fs
.
pathJoin
(
phantom
.
casperPath
,
'tests'
,
'testdir'
);
var
files
=
t
.
findTestFiles
(
testDirRoot
);
var
expected
=
[
"01_a/abc.js"
,
"01_a/def.js"
,
"02_b/ABC.js"
,
"02_b/abc.js"
,
"03_a.js"
,
"03_b.js"
,
"04/01_init.js"
,
"04/02_do.js"
].
map
(
function
(
entry
)
{
return
fs
.
pathJoin
(
testDirRoot
,
entry
);
});
t
.
assertEquals
(
files
,
expected
,
'findTestFiles() find test files and sort them'
);
t
.
done
();
...
...
Please
register
or
sign in
to post a comment