Remove lodash from @babel/node tests (#13025)
This commit is contained in:
parent
830a93cc97
commit
e2244c92d9
@ -26,7 +26,6 @@
|
||||
"@babel/register": "workspace:^7.13.8",
|
||||
"commander": "^4.0.1",
|
||||
"core-js": "^3.2.1",
|
||||
"lodash": "^4.17.19",
|
||||
"node-environment-flags": "^1.0.5",
|
||||
"regenerator-runtime": "^0.13.4",
|
||||
"v8flags": "^3.1.1"
|
||||
|
||||
@ -1,10 +1,8 @@
|
||||
import includes from "lodash/includes";
|
||||
import readdir from "fs-readdir-recursive";
|
||||
import * as helper from "@babel/helper-fixtures";
|
||||
import rimraf from "rimraf";
|
||||
import { sync as makeDirSync } from "make-dir";
|
||||
import child from "child_process";
|
||||
import merge from "lodash/merge";
|
||||
import path from "path";
|
||||
import fs from "fs";
|
||||
import { fileURLToPath } from "url";
|
||||
@ -51,7 +49,7 @@ const assertTest = function (stdout, stderr, opts) {
|
||||
|
||||
if (opts.stderr) {
|
||||
if (opts.stderrContains) {
|
||||
expect(includes(stderr, expectStderr)).toBeTruthy();
|
||||
expect(stderr.includes(expectStderr)).toBeTruthy();
|
||||
} else {
|
||||
expect(stderr).toBe(expectStderr);
|
||||
}
|
||||
@ -65,7 +63,7 @@ const assertTest = function (stdout, stderr, opts) {
|
||||
|
||||
if (opts.stdout) {
|
||||
if (opts.stdoutContains) {
|
||||
expect(includes(stdout, expectStdout)).toBeTruthy();
|
||||
expect(stdout.includes(expectStdout)).toBeTruthy();
|
||||
} else {
|
||||
expect(stdout).toBe(expectStdout);
|
||||
}
|
||||
@ -176,7 +174,7 @@ fs.readdirSync(fixtureLoc).forEach(function (binName) {
|
||||
};
|
||||
|
||||
const optionsLoc = path.join(testLoc, "options.json");
|
||||
if (fs.existsSync(optionsLoc)) merge(opts, require(optionsLoc));
|
||||
if (fs.existsSync(optionsLoc)) Object.assign(opts, require(optionsLoc));
|
||||
|
||||
["stdout", "stdin", "stderr"].forEach(function (key) {
|
||||
const loc = path.join(testLoc, key + ".txt");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user