Skip to content

Commit

Permalink
DEV CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchhentgesspotify committed Oct 21, 2022
1 parent d71dbbe commit 8332d3c
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions packages/jest-transform/src/ScriptTransformer.ts
Expand Up @@ -542,7 +542,14 @@ class ScriptTransformer {

let shouldCallTransform = false;

if (transformer && this.shouldTransform(filename)) {
// success
// success
console.log(transformer);
if (cacheFilePath) {
createDirectory(path.dirname(cacheFilePath));
}
if (transformer && this.shouldTransform(filename, cacheFilePath)) {
// failed
shouldCallTransform = true;
const process = transformer.processAsync ?? transformer.process;

Expand Down Expand Up @@ -810,11 +817,13 @@ class ScriptTransformer {
}
}

shouldTransform(filename: string): boolean {
shouldTransform(filename: string, cacheFilePath?: string): boolean {
// failed
const ignoreRegexp = this._cache.ignorePatternsRegExp;
const isIgnored = ignoreRegexp ? ignoreRegexp.test(filename) : false;

return this._config.transform.length !== 0 && !isIgnored;
// failed
}
}

Expand Down

0 comments on commit 8332d3c

Please sign in to comment.