Replace lodash 'clone' usage with ES6 Spread initializer (#11811)
This commit is contained in:
parent
aae1862170
commit
55ce749f42
@ -1,5 +1,4 @@
|
||||
import cloneDeep from "lodash/cloneDeep";
|
||||
import clone from "lodash/clone";
|
||||
import semver from "semver";
|
||||
import path from "path";
|
||||
import fs from "fs";
|
||||
@ -262,7 +261,7 @@ export default function get(entryLoc): Array<Suite> {
|
||||
if (shouldIgnore(suiteName)) continue;
|
||||
|
||||
const suite = {
|
||||
options: clone(rootOpts),
|
||||
options: { ...rootOpts },
|
||||
tests: [],
|
||||
title: humanize(suiteName),
|
||||
filename: entryLoc + "/" + suiteName,
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
import * as virtualTypes from "./path/lib/virtual-types";
|
||||
import * as t from "@babel/types";
|
||||
import clone from "lodash/clone";
|
||||
|
||||
/**
|
||||
* explode() will take a visitor object with all of the various shorthands
|
||||
@ -106,7 +105,7 @@ export function explode(visitor) {
|
||||
if (existing) {
|
||||
mergePair(existing, fns);
|
||||
} else {
|
||||
visitor[alias] = clone(fns);
|
||||
visitor[alias] = { ...fns };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user