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

Move assignment of cwd to default config #7146

Merged
merged 1 commit into from
Oct 12, 2018

Conversation

rubennorte
Copy link
Contributor

Summary

cwd is assigned to the project configuration in jest-cli, which makes it harder to get a normalized project configuration just using jest-config. This adds that configuration to the defaults so anyone using it directly can have exactly the same configuration jest-cli would have with the same parameters.

Test plan

I ran all current tests and manually tested that the configuration contained the default cwd.

const setConfig = (contexts, newConfig) =>
contexts.forEach(
context =>
(context.config = Object.freeze(
Copy link
Member

Choose a reason for hiding this comment

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

we don't wanna freeze anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's already frozen in jest-config. We only freeze it here because we're creating a new instance, which isn't necessary anymore.

@rubennorte rubennorte merged commit fbd66d3 into jestjs:master Oct 12, 2018
@rubennorte rubennorte deleted the move-cwd-to-default-config branch October 12, 2018 11:03
willsmythe added a commit to willsmythe/jest that referenced this pull request Jan 14, 2019
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants