Skip to content
This repository has been archived by the owner on Feb 19, 2021. It is now read-only.

fix(jest-config) Fallback to default Jest config if it's not overriden #42

Merged
merged 2 commits into from
Apr 6, 2018

Conversation

mthmulders
Copy link
Collaborator

@mthmulders mthmulders commented Apr 4, 2018

When Jest config was not overriden (ie., a project uses default Jest settings) Stryker would fail.

Fixes #38

Copy link
Member

@nicojs nicojs left a comment

Choose a reason for hiding this comment

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

Looks good, I've got one remark about the error.

@@ -17,7 +17,7 @@ export default class DefaultJestConfigLoader implements JestConfigLoader {
}

public loadConfig(): JestConfiguration {
const jestConfig = this.readConfigFromJestConfigFile() || this.readConfigFromPackageJson();
const jestConfig = this.readConfigFromJestConfigFile() || this.readConfigFromPackageJson() || {};

if (!jestConfig) {
throw new Error('Could not read Jest configuration, please provide a jest.config.js file or a jest config in your package.json');
Copy link
Member

Choose a reason for hiding this comment

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

This can be removed right? This error cannot occur?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You're definitely right! Removed these lines...

@nicojs nicojs merged commit 72b542a into stryker-mutator:master Apr 6, 2018
@nicojs
Copy link
Member

nicojs commented Apr 6, 2018

Released in v0.6

Changelog didn't update correctly, because the name commit was not confirm to the conventional changelog specs.

fix(jest-config) Fallback to default Jest config if it's not overriden (#42)

should have been

fix(jest-config): fallback to default Jest config if it's not overridden (#42)

@mthmulders mthmulders deleted the issue/38 branch April 6, 2018 09:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants