Skip to content

Commit

Permalink
fix(config): define matchTestFilePath before setupTsJestCfg (#2373)
Browse files Browse the repository at this point in the history
Closes #2371
  • Loading branch information
CatsMiaow committed Feb 18, 2021
1 parent f2808bb commit c427fea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
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

0 comments on commit c427fea

Please sign in to comment.