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
b6edadf7
...
b6edadf7b086c00c3d21543536e7efc1b21040d0
authored
2013-05-13 08:13:42 +0200
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed setUp() & tearDown() test setup
1 parent
f0325747
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
tests/suites/tester/setup-teardown-async.js
tests/suites/tester/setup-teardown.js
tests/suites/tester/setup-teardown-async.js
View file @
b6edadf
...
...
@@ -14,6 +14,9 @@ casper.test.tearDown(function(done) {
setTimeout
(
function
()
{
tearDown
=
true
;
done
();
// reset
casper
.
test
.
setUp
();
casper
.
test
.
tearDown
();
},
50
);
});
...
...
@@ -24,8 +27,5 @@ casper.test.begin('setUp() tests', 1, function(test) {
casper
.
test
.
begin
(
'tearDown() tests'
,
1
,
function
(
test
)
{
test
.
assertTrue
(
tearDown
,
'Tester.tearDown() executed the async tear down function'
);
// reset
test
.
setUp
();
test
.
tearDown
();
test
.
done
();
});
...
...
tests/suites/tester/setup-teardown.js
View file @
b6edadf
...
...
@@ -9,6 +9,9 @@ casper.test.setUp(function() {
casper
.
test
.
tearDown
(
function
()
{
tearDown
=
true
;
// reset
casper
.
test
.
setUp
();
casper
.
test
.
tearDown
();
});
casper
.
test
.
begin
(
'setUp() tests'
,
1
,
function
(
test
)
{
...
...
@@ -18,8 +21,5 @@ casper.test.begin('setUp() tests', 1, function(test) {
casper
.
test
.
begin
(
'tearDown() tests'
,
1
,
function
(
test
)
{
test
.
assertTrue
(
tearDown
,
'Tester.tearDown() executed the tear down function'
);
// reset
test
.
setUp
();
test
.
tearDown
();
test
.
done
();
});
...
...
Please
register
or
sign in
to post a comment