update tests to reflect new plugin api
This commit is contained in:
parent
01818a50fa
commit
19ad22f6e8
@ -393,15 +393,15 @@ suite("api", function () {
|
|||||||
test("not transformer", function () {
|
test("not transformer", function () {
|
||||||
assert.throws(function () {
|
assert.throws(function () {
|
||||||
new PluginManager().validate("foobar", {});
|
new PluginManager().validate("foobar", {});
|
||||||
}, /didn't export a Transformer instance/);
|
}, /didn't export a Plugin instance/);
|
||||||
|
|
||||||
assert.throws(function () {
|
assert.throws(function () {
|
||||||
new PluginManager().validate("foobar", "");
|
new PluginManager().validate("foobar", "");
|
||||||
}, /didn't export a Transformer instance/);
|
}, /didn't export a Plugin instance/);
|
||||||
|
|
||||||
assert.throws(function () {
|
assert.throws(function () {
|
||||||
new PluginManager().validate("foobar", []);
|
new PluginManager().validate("foobar", []);
|
||||||
}, /didn't export a Transformer instance/);
|
}, /didn't export a Plugin instance/);
|
||||||
});
|
});
|
||||||
|
|
||||||
test("object request");
|
test("object request");
|
||||||
|
|||||||
@ -10,8 +10,10 @@ suite("traversal path", function () {
|
|||||||
var actualCode = transform(expectCode, {
|
var actualCode = transform(expectCode, {
|
||||||
blacklist: "strict",
|
blacklist: "strict",
|
||||||
plugins: [new Plugin("foobar", {
|
plugins: [new Plugin("foobar", {
|
||||||
FunctionDeclaration: function () {
|
visitor: {
|
||||||
return "console.whatever()";
|
FunctionDeclaration: function () {
|
||||||
|
return "console.whatever()";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})]
|
})]
|
||||||
}).code;
|
}).code;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user