Skip to content

Commit

Permalink
Remove PhantomJS guards in integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilogorek committed Sep 7, 2017
1 parent 4f57fd9 commit ece5380
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 40 deletions.
40 changes: 19 additions & 21 deletions test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,29 +33,27 @@
<script src="../build/raven.test.js"></script>

<script>
if (!window.PHANTOMJS) {
(function(runner){
var failed = [];
(function(runner){
var failed = [];

runner.on('fail', function(test, err){
failed.push({
title: test.title,
fullTitle: test.fullTitle(),
error: {
message: err.message,
stack: err.stack
}
});
});
runner.on('fail', function(test, err){
failed.push({
title: test.title,
fullTitle: test.fullTitle(),
error: {
message: err.message,
stack: err.stack
}
});
});

runner.on('end', function(){
runner.stats.failed = failed;
if (typeof global !== "undefined") {
global.mochaResults = runner.stats;
}
});
})(mocha.run());
}
runner.on('end', function(){
runner.stats.failed = failed;
if (typeof global !== "undefined") {
global.mochaResults = runner.stats;
}
});
})(mocha.run());
</script>
</body>
</html>
36 changes: 17 additions & 19 deletions test/integration/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,28 +39,26 @@
<script src="test.js"></script>

<script>
if (!window.PHANTOMJS) {
(function (runner) {
window.runner = runner;
var failed = [];
(function (runner) {
window.runner = runner;
var failed = [];

runner.on('fail', function (test, err) {
failed.push({
title: test.title,
fullTitle: test.fullTitle(),
error: {
message: err.message,
stack: err.stack
}
});
runner.on('fail', function (test, err) {
failed.push({
title: test.title,
fullTitle: test.fullTitle(),
error: {
message: err.message,
stack: err.stack
}
});
});

runner.on('end', function () {
runner.stats.failed = failed;
window.mochaResults = runner.stats;
});
})(mocha.run());
}
runner.on('end', function () {
runner.stats.failed = failed;
window.mochaResults = runner.stats;
});
})(mocha.run());
</script>
</body>
</html>

0 comments on commit ece5380

Please sign in to comment.