diff --git a/test/runtime.js b/test/runtime.js new file mode 100644 index 0000000000..9a898499d8 --- /dev/null +++ b/test/runtime.js @@ -0,0 +1,15 @@ +var runtime = require("../lib/6to5/runtime"); +var assert = require("assert"); + +suite("runtime", function () { + test("default", function () { + var code = runtime(); + assert.ok(!!code.match(/to5Runtime/)); + }); + + test("custom", function () { + var code = runtime("customNamespace"); + assert.ok(code.match(/customNamespace/)); + assert.ok(!code.match(/to5Runtime/)); + }); +});