We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
At the moment it seems that Mocha is avoiding the sandboxing in VM2 altogether.
To test, run a code snippet with:
process.exit();
And you'll see it doesn't fail as you would expect it to do, I was also able to require any of the supposedly sandboxed builtins etc as well.
The text was updated successfully, but these errors were encountered:
I was at least able to run some tests in a node console in the root of the project checked out locally:
❯ node Welcome to Node.js v16.3.0. Type ".help" for more information. > const { run } = require('../mocha-vm'); undefined > code = "describe('tripler', function(){\n it('triples 2', function(){\n expect(1).to.eql(1)\n })\n})" "describe('tripler', function(){\n" + " it('triples 2', function(){\n" + ' expect(1).to.eql(1)\n' + ' })\n' + '})' > run(code).then(obj => console.log(obj)); Promise { <pending> } > tripler ✓ triples 2 1 passing (5ms) { summary: { passed: 1, failed: 0, tests: 1, suites: 1, depth: 0, duration: '3ms' }, data: [ { depth: 0, suite: 'tripler', tests: [Array], duration: '2ms' } ] }
Sorry, something went wrong.
but I can't seem to require it into other projects - I wonder what it would take to get it fixed up as an npm module again ...?
No branches or pull requests
At the moment it seems that Mocha is avoiding the sandboxing in VM2 altogether.
To test, run a code snippet with:
And you'll see it doesn't fail as you would expect it to do, I was also able to require any of the supposedly sandboxed builtins etc as well.
The text was updated successfully, but these errors were encountered: