Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

chore: make watch-mode file updates reliably detectable in tests (#6393)

Copilote0716ed592ab
diff --git a/test/integration/helpers.cjs b/test/integration/helpers.cjs
index c6e10cc1..a9401c06 100644
--- a/test/integration/helpers.cjs
+++ b/test/integration/helpers.cjs
@@ -812,6 +812,7 @@ function replaceFileContents(filepath, pattern, replacement) {
const contents = fs.readFileSync(filepath, "utf-8");
const newContents = contents.replace(pattern, replacement);
fs.writeFileSync(filepath, newContents, "utf-8");
+ touchFile(filepath);
}
/**