Skip to content

Commit 8332d3c

Browse files
DEV CI
1 parent d71dbbe commit 8332d3c

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

packages/jest-transform/src/ScriptTransformer.ts

+11-2
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,14 @@ class ScriptTransformer {
542542

543543
let shouldCallTransform = false;
544544

545-
if (transformer && this.shouldTransform(filename)) {
545+
// success
546+
// success
547+
console.log(transformer);
548+
if (cacheFilePath) {
549+
createDirectory(path.dirname(cacheFilePath));
550+
}
551+
if (transformer && this.shouldTransform(filename, cacheFilePath)) {
552+
// failed
546553
shouldCallTransform = true;
547554
const process = transformer.processAsync ?? transformer.process;
548555

@@ -810,11 +817,13 @@ class ScriptTransformer {
810817
}
811818
}
812819

813-
shouldTransform(filename: string): boolean {
820+
shouldTransform(filename: string, cacheFilePath?: string): boolean {
821+
// failed
814822
const ignoreRegexp = this._cache.ignorePatternsRegExp;
815823
const isIgnored = ignoreRegexp ? ignoreRegexp.test(filename) : false;
816824

817825
return this._config.transform.length !== 0 && !isIgnored;
826+
// failed
818827
}
819828
}
820829

0 commit comments

Comments
 (0)