From 874bd7b2b86c624c5868ca66da90925cd5d3a31e Mon Sep 17 00:00:00 2001 From: Jermolene Date: Wed, 13 Nov 2013 21:26:13 +0000 Subject: [PATCH] Tweaks tests This was the only place we were using the `variables` option to the widget constructor. --- editions/test/tiddlers/tests/test-widget.js | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/editions/test/tiddlers/tests/test-widget.js b/editions/test/tiddlers/tests/test-widget.js index d65efb3bf..b74e572ed 100755 --- a/editions/test/tiddlers/tests/test-widget.js +++ b/editions/test/tiddlers/tests/test-widget.js @@ -16,10 +16,9 @@ describe("Widget module", function() { var widget = require("$:/core/modules/widgets/widget.js"); - function createWidgetNode(parseTreeNode,wiki,variables) { + function createWidgetNode(parseTreeNode,wiki) { return new widget.widget(parseTreeNode,{ wiki: wiki, - variables: variables || {}, document: $tw.document }); } @@ -264,18 +263,8 @@ describe("Widget module", function() { it("should deal with attributes specified as macro invocations", function() { var wiki = new $tw.Wiki(); // Construct the widget node - var text = "
>>Content
"; - var variables = { - myMacro: { - value: "My something $one$, $two$ or other $three$", - params: [ - {name: "one", "default": "paramOne"}, - {name: "two"}, - {name: "three", "default": "paramTwo"} - ] - } - }; - var widgetNode = createWidgetNode(parseText(text,wiki),wiki,variables); + var text = "\\define myMacro(one:\"paramOne\",two,three:\"paramTwo\")\nMy something $one$, $two$ or other $three$\n\\end\n
>>Content
"; + var widgetNode = createWidgetNode(parseText(text,wiki),wiki); // Render the widget node to the DOM var wrapper = renderWidgetNode(widgetNode); // Test the rendering