From 5b209d09c5b79b9826635c0676b6379a42700991 Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Mon, 12 Sep 2022 22:00:59 -0400 Subject: [PATCH] Fix test --- .../tests/macros/WebAssemblySidebar.test.js | 36 +++++++------------ 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/kumascript/tests/macros/WebAssemblySidebar.test.js b/kumascript/tests/macros/WebAssemblySidebar.test.js index 1e1225f038ec..4afa776c89d2 100644 --- a/kumascript/tests/macros/WebAssemblySidebar.test.js +++ b/kumascript/tests/macros/WebAssemblySidebar.test.js @@ -1,7 +1,7 @@ /** * @prettier */ -const { assert, itMacro, describeMacro, beforeEachMacro } = require("./utils"); +const { assert, itMacro, describeMacro } = require("./utils"); const expected = `\ `; describeMacro("WebAssemblySidebar", function () { - beforeEachMacro(function (macro) { - const baseURL = "/en-US/docs/Web/JavaScript/Reference/Global_Objects/"; - - // Mock calls to template("jsxref", [partialSlug]) - macro.ctx.template = jest.fn((macro, args) => { - const jsSlug = args[0]; - const partialSlug = jsSlug.replace(".", "/"); - const url = baseURL + partialSlug; - return `${jsSlug}`; - }); - }); - itMacro("Generates WebAssembly Sidebar", function (macro) { return assert.eventually.equal(macro.call(), expected); });