6.0.0
I'm extremely stupid and didn't commit as I go. To anyone reading this I'm extremely sorry. A lot of these changes are very broad and I plan on releasing Babel 6.0.0 today live on stage at Ember Camp London so I'm afraid I couldn't wait. If you're ever in London I'll buy you a beer (or assorted beverage!) to make up for it, also I'll kiss your feet and give you a back massage, maybe.
This commit is contained in:
@@ -4,28 +4,6 @@ var parse = require("../lib/helpers/parse");
|
||||
var t = require("babel-types");
|
||||
|
||||
suite("util", function () {
|
||||
test("invalid template", function () {
|
||||
assert.throws(function () {
|
||||
util.template("invalid template");
|
||||
}, /unknown template/);
|
||||
});
|
||||
|
||||
test("templates do not recurse", function () {
|
||||
var key = __filename;
|
||||
var KEY = parse("replacedKey").program.body[0].expression;
|
||||
var VALUE = parse("+KEY").program.body[0].expression;
|
||||
|
||||
util.templates[key] = util.parseTemplate(key, "KEY = VALUE;");
|
||||
var result = util.template(key, { KEY: KEY, VALUE: VALUE });
|
||||
delete util.templates[key];
|
||||
|
||||
assert.strictEqual(
|
||||
result.right.argument.name,
|
||||
"KEY",
|
||||
"template should not recurse into replaced nodes, replacing KEY inside VALUE"
|
||||
);
|
||||
});
|
||||
|
||||
test("canCompile", function () {
|
||||
assert.ok(util.canCompile("test.js"));
|
||||
assert.ok(util.canCompile("/test.js"));
|
||||
@@ -103,7 +81,6 @@ suite("util", function () {
|
||||
});
|
||||
|
||||
test("toIdentifier", function () {
|
||||
assert.equal(t.toIdentifier(t.identifier("swag")), "swag");
|
||||
assert.equal(t.toIdentifier("swag-lord"), "swagLord");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user