Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cli): fix a bug in CLI argument parsing (#5646)
This fixes a bug related to parsing of Boolean CLI arguments using the `--argName=value` type syntax. We intend to support using that syntax to pass a boolean CLI flag (like `--watch`) but actually at present the way it is 'parsed' will result in such flags always being set to true! Not good! This is because we were setting the value of the boolean CLI flag to `Boolean('false')` if you pass `--argName=false`, which does _not_ result in a value of `false` but instead a value of `true`. This is changed to instead use a check that the value equals `'true'` to turn the value into a boolean, and regression tests are added. This was noticed when investigating #5640, but that bug actually has to do with how we convert CLI arguments into a Jest configuration.
- Loading branch information