From 19ad22f6e8d69f611132fd99539098b0a1a08ccc Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Mon, 15 Jun 2015 16:36:45 +0100 Subject: [PATCH] update tests to reflect new plugin api --- test/core/api.js | 6 +++--- test/core/path.js | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/test/core/api.js b/test/core/api.js index 1bc6366d7f..97b695f4c0 100644 --- a/test/core/api.js +++ b/test/core/api.js @@ -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"); diff --git a/test/core/path.js b/test/core/path.js index 17fcf5dbdb..46528b4231 100644 --- a/test/core/path.js +++ b/test/core/path.js @@ -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;