Test: Remove graceful-fs hack (#8245)

This commit is contained in:
fisker Cheung authored and GitHub committed 2020-05-11 09:05:48 +08:00
1 parent c768be4dd3
commit 9686475c80
3 files changed
-13

No files matched your search

-6
View File
@@ -23,12 +23,6 @@ module.exports = {
], ],
coverageReporters: ["text", "lcov"], coverageReporters: ["text", "lcov"],
moduleNameMapper: { moduleNameMapper: {
// Jest wires `fs` to `graceful-fs`, which causes a memory leak when
// `graceful-fs` does `require('fs')`.
// Ref: https://github.com/facebook/jest/issues/2179#issuecomment-355231418
// If this is removed, see also scripts/build/build.js.
"graceful-fs": "<rootDir>/tests_config/fs.js",
"prettier/local": "<rootDir>/tests_config/require_prettier.js", "prettier/local": "<rootDir>/tests_config/require_prettier.js",
"prettier/standalone": "<rootDir>/tests_config/require_standalone.js", "prettier/standalone": "<rootDir>/tests_config/require_standalone.js",
}, },
-4
View File
@@ -34,9 +34,6 @@ const EXTERNALS = [
"util", "util",
"readline", "readline",
"tty", "tty",
// See comment in jest.config.js
"graceful-fs",
]; ];
const entries = [ const entries = [
@@ -186,7 +183,6 @@ function getRollupOutputOptions(bundle) {
const options = { const options = {
file: `dist/${bundle.output}`, file: `dist/${bundle.output}`,
strict: typeof bundle.strict === "undefined" ? true : bundle.strict, strict: typeof bundle.strict === "undefined" ? true : bundle.strict,
paths: [{ "graceful-fs": "fs" }],
}; };
if (bundle.target === "node") { if (bundle.target === "node") {
-3
View File
@@ -1,3 +0,0 @@
"use strict";
module.exports = require("fs");