deflake 1.2.49 → 1.2.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.js +1 -1
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -619,7 +619,7 @@ async function applyFix(res, loc, backups = new Map()) {
|
|
|
619
619
|
continue;
|
|
620
620
|
}
|
|
621
621
|
// Safety: block constructor patterns (this.xxx =) from being inserted into spec/test files
|
|
622
|
-
if (/\.(spec|test)\.(ts|js)$/.test(
|
|
622
|
+
if (/\.(spec|test)\.(ts|js)$/.test(loc.path) && /^\s*this\.\w+\s*=/.test(p.new_line)) {
|
|
623
623
|
console.log(` ${C.YELLOW}⏭️ Blocked: constructor assignment in spec file (${p.new_line.trim().substring(0, 50)})${C.RESET}`);
|
|
624
624
|
continue;
|
|
625
625
|
}
|