Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adapt to newer nodejs versions (runInThisContext)

  • Loading branch information...
commit b88b238ffb575a6d7406389ffb622c3a8e9bf0de 1 parent 4a6e1fc
@davidaurelio davidaurelio authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/adapters/node.js
View
5 src/adapters/node.js
@@ -26,7 +26,10 @@ foounit.generateSuite = require('./node/cli').generateSuite;
var adapter = (function (){
var sys = require('sys')
, fs = require('fs')
- , runInThisContext = process.binding('evals').Script.runInThisContext;
+ , runInThisContext = (
+ process.binding('evals').Script || // older node versions
+ require('vm') // newer node versions
+ ).runInThisContext;
// Private variables
var self = {}, _specdir;
Please sign in to comment.
Something went wrong with that request. Please try again.