add runtime test

This commit is contained in:
Sebastian McKenzie
2014-11-14 09:12:54 +11:00
parent 715884662e
commit 6065220f9b

15
test/runtime.js Normal file
View File

@@ -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/));
});
});