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

Running without custom Jest configuration isn't possible #38

Closed
mthmulders opened this issue Apr 2, 2018 · 3 comments
Closed

Running without custom Jest configuration isn't possible #38

mthmulders opened this issue Apr 2, 2018 · 3 comments

Comments

@mthmulders
Copy link
Collaborator

If you don't have a jest.config.js file, nor a jest key in the package.json, Stryker will fail:

[2018-04-02 20:52:17.345] [INFO] ConfigReader - Using stryker.conf.js in the current working directory.
/Users/maarten/Projects/hyperion-web/node_modules/stryker-jest-runner/src/configLoaders/DefaultJestConfigLoader.js:16
            throw new Error('Could not read Jest configuration, please provide a jest.config.js file or a jest config in your package.json');

As a work-around, create a jest.config.js with just

{
}

I don't think this is a nice approach. Maybe we should just let Stryker could handle this situation?

@simondel
Copy link
Member

simondel commented Apr 2, 2018

Nice catch! What kind of behaviour would you expect?

@nicojs
Copy link
Member

nicojs commented Apr 2, 2018

I guess it should default to running with default jest config, no? Maybe logging it as an info message.

@mthmulders do you want the honors of implementing this feature?

@mthmulders
Copy link
Collaborator Author

I'll give it a shot. I'd say Stryker should just follow the Jest behaviour... We'll see if that yields something Stryker can work with.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants