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

config object from ts-jest/presets is missing testMatch and moduleFileExtensions params #1156

Closed
vbvxx opened this issue Jul 17, 2019 · 1 comment

Comments

@vbvxx
Copy link

vbvxx commented Jul 17, 2019

Issue:

After bumping to 24.0.2, when I import the defaults presets from 'ts-jest/presets'

const { defaults: tsjPreset } = require("ts-jest/presets");

I get the following config object:

{ transform: { '^.+\\.tsx?$': 'ts-jest' } }

Expected behavior:

I would expect the output I had when using 23.10.4:

{ 
  transform: { '^.+\\.tsx?$': 'ts-jest' },
  testMatch:
   [ '**/__tests__/**/*.[jt]s?(x)',
     '**/?(*.)+(spec|test).[tj]s?(x)',
     '**/__tests__/**/*.ts?(x)',
     '**/?(*.)+(spec|test).ts?(x)' ],
  moduleFileExtensions: [ 'js', 'json', 'jsx', 'ts', 'tsx', 'node' ] 
}

Debug log:

log file content
# content of ts-jest.log :
# it was empty

Minimal repo

https://github.com/vbvxx/ts-jest-issue/
This is a dump project where I just console print the defaults from ts-jest/presets in jest.config.js, where we can see that there is only transform defined when running yarn jest

https://github.com/vbvxx/ts-jest-issue/blob/master/package.json

@vbvxx vbvxx changed the title ts-jest/presets are missing testMatch and moduleFileExtensions params config object from ts-jest/presets is missing testMatch and moduleFileExtensions params Jul 17, 2019
@ahnpnl
Copy link
Collaborator

ahnpnl commented Sep 6, 2019

This is expected change in v24 due to #957, including the discussion to simplify this preset.

@ahnpnl ahnpnl closed this as completed Sep 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants