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

fix(config): define matchTestFilePath before setupTsJestCfg #2373

Merged
merged 1 commit into from Feb 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/__mocks__/dummy-transformer.js
Expand Up @@ -3,6 +3,8 @@ const { LogContexts, LogLevels } = require('bs-logger')
function factory(cs) {
const logger = cs.logger.child({ namespace: 'dummy-transformer' })
const ts = cs.compilerModule
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const program = cs.tsCompiler.program

function createVisitor(_ctx, _) {
return (node) => node
Expand Down
4 changes: 2 additions & 2 deletions src/config/config-set.ts
Expand Up @@ -190,8 +190,6 @@ export class ConfigSet {
this.logger.debug({ compilerModule: this.compilerModule }, 'normalized compiler module config via ts-jest option')

this._backportJestCfg()
this._setupTsJestCfg(options)
this._resolveTsCacheDir()
this._matchablePatterns = [...this._jestCfg.testMatch, ...this._jestCfg.testRegex].filter(
(pattern) =>
/**
Expand All @@ -206,6 +204,8 @@ export class ConfigSet {
this._matchTestFilePath = globsToMatcher(
this._matchablePatterns.filter((pattern: any) => typeof pattern === 'string') as string[],
)
this._setupTsJestCfg(options)
this._resolveTsCacheDir()
}

/**
Expand Down