From 6065220f9b540a065299ce8ba3392cdbefd489ec Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Fri, 14 Nov 2014 09:12:54 +1100 Subject: [PATCH] add runtime test --- test/runtime.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/runtime.js 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/)); + }); +});