Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove lodash from @babel/node tests #13025

Merged
merged 1 commit into from Mar 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 @@ -940,7 +940,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