Remove outdated mock (#17391)

This commit is contained in:
fisker Cheung authored and GitHub committed 2025-04-23 02:25:01 +08:00
1 parent 05a5ff54d0
commit 8c7aa6957b
1 file changed
-17
-17
View File
@@ -1,4 +1,3 @@
import fs from "node:fs";
import path from "node:path";
import readline from "node:readline";
import url from "node:url";
@@ -21,22 +20,6 @@ const replaceAll = (text, find, replacement) =>
async function run(options) {
Date.now = () => 0;
/*
A fake non-existing directory to test plugin search won't crash.
See:
- `isDirectory` function in `src/common/load-plugins.js`
- Test file `./__tests__/plugin-virtual-directory.js`
- Pull request #5819
*/
const originalStat = fs.promises.stat;
fs.promises.statSync = (filename) =>
originalStat(
path.basename(filename) === "virtualDirectory"
? import.meta.url
: filename,
);
readline.clearLine = (stream) => {
stream.write(
`\n[[called readline.clearLine(${