From 373ef69238a22c8f8b70174a75ca7ae54d73fbd9 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.ts | 36 +++++++------------ 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/kumascript/tests/macros/WebAssemblySidebar.test.ts b/kumascript/tests/macros/WebAssemblySidebar.test.ts index 730d3d8d0e9d..9c292b6a14ae 100644 --- a/kumascript/tests/macros/WebAssemblySidebar.test.ts +++ b/kumascript/tests/macros/WebAssemblySidebar.test.ts @@ -1,4 +1,4 @@ -import { assert, itMacro, describeMacro, beforeEachMacro } from "./utils"; +import { assert, itMacro, describeMacro } from "./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); });