Skip to content

Commit

Permalink
add test for ModuleInfo#removeIgnoredGlobalNames
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasso85 committed Aug 31, 2020
1 parent 1a2d281 commit dbc69e6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/lib/lbt/resources/ModuleInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
});

0 comments on commit dbc69e6

Please sign in to comment.