Skip to content

Conversation

Sebmaster
Copy link
Member

This finally gets us some behaviour-based tests in this repo instead of relying on manually checked snapshots.

@Sebmaster Sebmaster force-pushed the feature/idl-tests branch from 89117e5 to 93e26f3 Compare June 1, 2019 18:33
Comment on lines +28 to +37
return vm.runInContext(
`(() => {
let exports = {};
const module = { exports };
(() => {${src}})();
return module.exports;
})();`,
sandbox,
{ filename: resolved, lineOffset: 5, columnOffset: 16 }
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be better to use vm.compileFunction(…) here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants