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 () {
|
||||
assert.throws(function () {
|
||||
new PluginManager().validate("foobar", {});
|
||||
}, /didn't export a Transformer instance/);
|
||||
}, /didn't export a Plugin instance/);
|
||||
|
||||
assert.throws(function () {
|
||||
new PluginManager().validate("foobar", "");
|
||||
}, /didn't export a Transformer instance/);
|
||||
}, /didn't export a Plugin instance/);
|
||||
|
||||
assert.throws(function () {
|
||||
new PluginManager().validate("foobar", []);
|
||||
}, /didn't export a Transformer instance/);
|
||||
}, /didn't export a Plugin instance/);
|
||||
});
|
||||
|
||||
test("object request");
|
||||
|
||||
@ -10,8 +10,10 @@ suite("traversal path", function () {
|
||||
var actualCode = transform(expectCode, {
|
||||
blacklist: "strict",
|
||||
plugins: [new Plugin("foobar", {
|
||||
FunctionDeclaration: function () {
|
||||
return "console.whatever()";
|
||||
visitor: {
|
||||
FunctionDeclaration: function () {
|
||||
return "console.whatever()";
|
||||
}
|
||||
}
|
||||
})]
|
||||
}).code;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user