Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: jest defaults are overriding passed args. #3328

Closed
3 tasks done
George-Payne opened this issue Apr 13, 2022 · 1 comment
Closed
3 tasks done

bug: jest defaults are overriding passed args. #3328

George-Payne opened this issue Apr 13, 2022 · 1 comment
Labels
Bug: Validated This PR or Issue is verified to be a bug within Stencil

Comments

@George-Payne
Copy link
Contributor

Prerequisites

Stencil Version

12.15.0

Current Behavior

Command line flags passed to stencil test are being overridden by the stencil defaults.

Running stencil test --spec --passWithNoTests will log out the correct arguments:

[35:48.6]  @stencil/core
[35:48.8]  v2.15.0 ⛷
[35:48.9]  testing spec files
[35:48.9]  jest args: --passWithNoTests --spec --max-workers=8

But then fail with:

No tests found, exiting with code 1
Run with `--passWithNoTests` to exit with code 0

You can see the override happening on line:
https://github.com/ionic-team/stencil/blame/main/src/testing/jest/jest-config.ts#L62

And if we add some logs, we can see the passed flag being overridden:

image

Expected Behavior

Defaults should be the default, and not override the passed flags

Steps to Reproduce

In a stencil repo with no tests, run stencil test --spec --passWithNoTests and observe failure.

or see overridden-test-flags branch in repo: https://github.com/George-Payne/stencil-custom-target-example/tree/overridden-test-flags

Code Reproduction URL

https://github.com/George-Payne/stencil-custom-target-example/tree/overridden-test-flags

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Apr 13, 2022
@rwaskiewicz rwaskiewicz added Bug: Validated This PR or Issue is verified to be a bug within Stencil and removed triage labels Apr 13, 2022
@rwaskiewicz
Copy link
Contributor

The fix for this issue has been released as a part of Stencil v2.15.1. As a result I'm going to close this issue. Thanks again for your help with this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: Validated This PR or Issue is verified to be a bug within Stencil
Projects
None yet
Development

No branches or pull requests

2 participants