Skip to content

Commit

Permalink
test(core): Fix task runner test (#12801)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomi authored and netroy committed Jan 23, 2025
1 parent 78646eb commit 08bc22f
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,14 @@ export class JsTaskRunner extends TaskRunner {
const { jsRunnerConfig } = config;

const parseModuleAllowList = (moduleList: string) =>
moduleList === '*' ? '*' : new Set(moduleList.split(',').map((x) => x.trim()));
moduleList === '*'
? '*'
: new Set(
moduleList
.split(',')
.map((x) => x.trim())
.filter((x) => x !== ''),
);

const allowedBuiltInModules = parseModuleAllowList(jsRunnerConfig.allowedBuiltInModules ?? '');
const allowedExternalModules = parseModuleAllowList(
Expand Down

0 comments on commit 08bc22f

Please sign in to comment.