From dbc69e640c736b0351e88f834020e51d37b76ded Mon Sep 17 00:00:00 2001 From: Tobias Sorn Date: Fri, 28 Aug 2020 11:19:29 +0200 Subject: [PATCH] add test for ModuleInfo#removeIgnoredGlobalNames --- test/lib/lbt/resources/ModuleInfo.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/lib/lbt/resources/ModuleInfo.js b/test/lib/lbt/resources/ModuleInfo.js index 9ecc16569..670e82281 100644 --- a/test/lib/lbt/resources/ModuleInfo.js +++ b/test/lib/lbt/resources/ModuleInfo.js @@ -61,3 +61,14 @@ test("ModuleInfo: toString", async (t) => { // expectation t.is(stringContent, "ModuleInfo(myName, dependencies=dep1,dep2, includes=sub1,sub2)", "string value is correct"); }); + +test("ModuleInfo: removeIgnoredGlobalNames", (t) => { + // setup + const moduleInfo = new ModuleInfo("myName"); + moduleInfo.exposedGlobals = ["supi", "dupi"]; + + moduleInfo.removeIgnoredGlobalNames(["hop", "supi"]); + + // expectation + t.deepEqual(moduleInfo.exposedGlobals, ["dupi"], "exposedGlobals are correct"); +});