Skip to content

Commit

Permalink
feat(jest): multiple projects
Browse files Browse the repository at this point in the history
  • Loading branch information
Yehonal committed Jan 11, 2024
1 parent 267ba2a commit 2fb0135
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion jest/src/config/jest-conf.generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,15 @@ export function jestConfGenerator(
const selectedProj =
argv.proj || process.env.npm_config_projects?.split(',') || 'all';

projects = projectSets[selectedProj];
projects = Array.isArray(selectedProj)
? Object.values(projectSets)
.flat()
.filter((value) => {
return selectedProj.some((projName) => {
return value.displayName.startsWith(`unit/${projName}`);
});
})
: projectSets[selectedProj];

const paths = [];

Expand Down

0 comments on commit 2fb0135

Please sign in to comment.