Skip to content

fix(@angular-devkit/build-angular): do not fail compilation when spec pattern does not match#24665

Merged
angular-robot[bot] merged 1 commit intoangular:mainfrom
alan-agius4:karma-empty-suit
Feb 7, 2023
Merged

fix(@angular-devkit/build-angular): do not fail compilation when spec pattern does not match#24665
angular-robot[bot] merged 1 commit intoangular:mainfrom
alan-agius4:karma-empty-suit

Conversation

@alan-agius4
Copy link
Collaborator

Previously, we failed the compilation when the specified patterns did not match any spec file. This breaks the case were users configure Karma to not fail on empty test suit.

Closes #24644

@alan-agius4 alan-agius4 added the target: patch This PR is targeted for the next patch release label Feb 6, 2023
… pattern does not match

Previously, we failed the compilation when the specified patterns did not match any spec file. This breaks the case were users configure Karma to not fail on empty test suit.

Closes angular#24644
const { result, logs } = await harness.executeOnce();
const { result } = await harness.executeOnce();
expect(result?.success).toBeFalse();
expect(logs).toContain(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the log message should still be here even with the logic change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Form my understanding Webpack will print the logs to the console directly.

@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label Feb 6, 2023
@angular angular deleted a comment from ngbot bot Feb 6, 2023
@angular-robot angular-robot bot merged commit d9c697b into angular:main Feb 7, 2023
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 10, 2023
@alan-agius4 alan-agius4 deleted the karma-empty-suit branch June 9, 2023 15:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Karma unit tests do not work if library has no .spec.ts files - Error: Specified patterns: "**/*.spec.ts" did not match any spec files.

2 participants