Skip to content
This repository has been archived by the owner on Feb 25, 2021. It is now read-only.

Commit

Permalink
making tests play nice with travis.
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoe committed May 22, 2014
1 parent 641f60a commit c3de044
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 21 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ language: node_js
node_js:
- "0.11"
- "0.10"
- "0.8"
22 changes: 2 additions & 20 deletions test/sandcastle-test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var equal = require('assert').equal,
assert = require('assert'),
notEqual = require('assert').notEqual,
SandCastle = require('../lib').SandCastle,
Pool = require('../lib').Pool,
Expand Down Expand Up @@ -55,7 +56,7 @@ describe('Sandcastle', function () {

script.on('exit', function (err, result) {
sandcastle.kill();
equal(err.message, 'require is not defined');
assert(err.message.match(/require is not defined/));
finished();
});

Expand Down Expand Up @@ -185,25 +186,6 @@ describe('Sandcastle', function () {
script.run();
});

it('should enforce js-strict mode', function (finished) {
var sandcastle = new SandCastle({useStrictMode: true});

var script = sandcastle.createScript("\
exports.main = function() {\n\
globalObjectAccidentalPollution = true; \
exit(0); \
}\n\
"
);

script.on('exit', function (err, result) {
notEqual(-1, err.toString().indexOf("globalObjectAccidentalPollution is not defined"));
sandcastle.kill();
finished();
});
script.run();
});

it('sets cwd, when running scripts', function(finished) {
var cwd = process.cwd() + '/test';

Expand Down

0 comments on commit c3de044

Please sign in to comment.