Sha256: ede2d4163d973d4eaf28605a9533fe06ec7201d227e9ec7615714f58e4b655e9
Contents?: true
Size: 623 Bytes
Versions: 3
Compression:
Stored size: 623 Bytes
Contents
common = require("../common"); assert = common.assert var Script = process.binding('evals').Script; common.debug('run in a new empty context'); var context = Script.createContext(); var result = Script.runInContext('"passed";', context); assert.equal('passed', result); common.debug('create a new pre-populated context'); context = Script.createContext({'foo': 'bar', 'thing': 'lala'}); assert.equal('bar', context.foo); assert.equal('lala', context.thing); common.debug('test updating context'); result = Script.runInContext('var foo = 3;', context); assert.equal(3, context.foo); assert.equal('lala', context.thing);
Version data entries
3 entries across 3 versions & 1 rubygems