Skip to content

Commit

Permalink
Remove lodash from @babel/node tests (#13025)
Browse files Browse the repository at this point in the history
  • Loading branch information
jridgewell committed Mar 19, 2021
1 parent 830a93c commit e2244c9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
1 change: 0 additions & 1 deletion packages/babel-node/package.json
Expand Up @@ -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"
Expand Down
8 changes: 3 additions & 5 deletions packages/babel-node/test/index.js
@@ -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";
Expand Down Expand Up @@ -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);
}
Expand All @@ -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);
}
Expand Down Expand Up @@ -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");
Expand Down
1 change: 0 additions & 1 deletion yarn.lock
Expand Up @@ -939,7 +939,6 @@ __metadata:
commander: ^4.0.1
core-js: ^3.2.1
fs-readdir-recursive: ^1.0.0
lodash: ^4.17.19
make-dir: ^2.1.0
node-environment-flags: ^1.0.5
regenerator-runtime: ^0.13.4
Expand Down

0 comments on commit e2244c9

Please sign in to comment.