remove traversal and removal of EmptyStatements and add source map testing support
This commit is contained in:
parent
a66918fa04
commit
4a1496ee05
@ -38,12 +38,6 @@ var transform = module.exports = function (code, opts) {
|
||||
};
|
||||
|
||||
transform._run = function (code, tree, opts) {
|
||||
traverse(tree, function (node) {
|
||||
if (node.type === "EmptyStatement") {
|
||||
return traverse.Delete;
|
||||
}
|
||||
});
|
||||
|
||||
var generateUid = util.buildUidGenerator();
|
||||
|
||||
_.each(transform.transformers, function (transformer, name) {
|
||||
@ -108,6 +102,10 @@ transform.test = function (task, assert) {
|
||||
|
||||
assert.equal(actualCode, expectCode);
|
||||
|
||||
if (task.sourceMap) {
|
||||
assert.deepEqual(task.sourceMap, actualResult.map);
|
||||
}
|
||||
|
||||
if (task.sourceMappings) {
|
||||
var consumer = new sourceMap.SourceMapConsumer(actualResult.map);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user