Skip to content

Commit

Permalink
unnamed project
Browse files Browse the repository at this point in the history
  • Loading branch information
F3n67u committed Apr 1, 2022
1 parent 29abd26 commit 4871daa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion e2e/__tests__/selectProjects.test.ts
Expand Up @@ -291,7 +291,9 @@ describe('Given a config with two projects, first-project and an unnamed project
});
it('prints that only second-project will run', () => {
const stderrThirdLine = result.stderr.split('\n')[2];
expect(stderrThirdLine).toMatch(/^Running one project: second-project/);
expect(stderrThirdLine).toMatch(
/^Running one project: <unnamed project>/,
);
});
});
});
3 changes: 2 additions & 1 deletion packages/jest-core/src/getSelectProjectsMessage.ts
Expand Up @@ -28,7 +28,8 @@ function getProjectsRunningMessage(
projectConfigs: Array<Config.ProjectConfig>,
): string {
if (projectConfigs.length === 1) {
const name = getProjectDisplayName(projectConfigs[0]);
const name =
getProjectDisplayName(projectConfigs[0]) ?? '<unnamed project>';
return `Running one project: ${chalk.bold(name)}\n`;
}
const projectsList = projectConfigs
Expand Down

0 comments on commit 4871daa

Please sign in to comment.