Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

update fixture paths for sandbox tests

  • Loading branch information...
commit 4f8a013b8189fd557b2b675462366f1c5fadf441 1 parent 755e6b7
@caolan authored
Showing with 12 additions and 4 deletions.
  1. +12 −4 test/test-sandbox.js
View
16 test/test-sandbox.js
@@ -3,21 +3,29 @@ var sandbox = require('../lib/utils').sandbox;
var testCase = nodeunit.testCase;
exports.testSimpleSandbox = function(test){
- var raw_jscode1 = sandbox('fixtures/raw_jscode1.js');
+ var raw_jscode1 = sandbox(__dirname + '/fixtures/raw_jscode1.js');
test.equal(raw_jscode1.hello_world('foo'), '_foo_', 'evaluation ok');
test.done();
};
exports.testSandboxContext = function(test){
a_variable = 42; // should not be visible in the sandbox
- var raw_jscode2 = sandbox('fixtures/raw_jscode2.js');
+ var raw_jscode2 = sandbox(__dirname + '/fixtures/raw_jscode2.js');
a_variable = 42; // again for the win
- test.equal(raw_jscode2.get_a_variable(), 'undefined', 'the variable should not be defined');
+ test.equal(
+ raw_jscode2.get_a_variable(),
+ 'undefined',
+ 'the variable should not be defined'
+ );
test.done();
};
exports.testSandboxMultiple = function(test){
- var raw_jscode3 = sandbox(['fixtures/raw_jscode3.js','fixtures/raw_jscode3.js','fixtures/raw_jscode3.js']);
+ var raw_jscode3 = sandbox([
+ __dirname + '/fixtures/raw_jscode3.js',
+ __dirname + '/fixtures/raw_jscode3.js',
+ __dirname + '/fixtures/raw_jscode3.js'
+ ]);
test.equal(raw_jscode3.t, 3, 'two files loaded');
test.done();
};
Please sign in to comment.
Something went wrong with that request. Please try again.