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

Export default config #5943

Closed
tkrotoff opened this issue Apr 8, 2018 · 3 comments
Closed

Export default config #5943

tkrotoff opened this issue Apr 8, 2018 · 3 comments

Comments

@tkrotoff
Copy link
Contributor

tkrotoff commented Apr 8, 2018

Would be nice to officially export the default Jest configuration so it can be expanded.

Example:

// File jest.config.js

// See https://github.com/facebook/jest/blob/v22.4.2/packages/jest-config/src/defaults.js
const defaults = require('jest-config/build/defaults').default;

module.exports = {
  // ...
  moduleFileExtensions: [...defaults.moduleFileExtensions, 'ts', 'tsx']
  // ...
};

Line const defaults = require('jest-config/build/defaults').default works but is not very elegant (something like import { defaults } from 'jest-config' would be nice).
Also if officially supported, it should be documented.

@SimenB
Copy link
Member

SimenB commented Apr 9, 2018

@tkrotoff
Copy link
Contributor Author

tkrotoff commented Apr 9, 2018

See PR #5948

@tkrotoff tkrotoff closed this as completed Apr 9, 2018
tkrotoff added a commit to tkrotoff/react-form-with-constraints that referenced this issue May 27, 2018
@github-actions
Copy link

This issue 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

No branches or pull requests

2 participants