MCPcopy Index your code
hub / github.com/TypeStrong/tsify / expectConsoleOutputFromScript

Function expectConsoleOutputFromScript

test/test.js:755–766  ·  view source on GitHub ↗
(t, src, expected)

Source from the content-addressed store, hash-verified

753}
754
755function expectConsoleOutputFromScript(t, src, expected) {
756 t.notEqual(src, null, 'Should have compiled output');
757
758 var actual = [];
759 var sandbox = { console: { log: function (str) { actual.push(str); }}};
760 try {
761 vm.runInNewContext(src, sandbox);
762 t.deepEqual(actual, expected, 'Should have expected console.log output');
763 } catch (err) {
764 t.fail(err);
765 }
766}
767
768function expectMappedToken(t, srcFile, mapSourceFile, compiled, token) {
769 if (!token) {

Callers 1

test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected