test(core): Fix task runner test (#12801)

This commit is contained in:
Tomi Turtiainen 2025-01-23 14:03:01 +02:00 committed by GitHub
parent 2020dc502f
commit 3fa0714c22
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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(