Skip to content

Commit e060ace

Browse files
committedNov 24, 2018
Switch back to Hoek.clone from lodash.deepClone.
Fix lint-md script in package.json to work on Windows.
1 parent da9c89d commit e060ace

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed
 

‎lib/reporters/multiple.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// Load modules
44

5-
const { cloneDeep } = require('lodash');
5+
const Hoek = require('hoek');
66
const Reporters = require('./index');
77

88

@@ -17,7 +17,7 @@ exports = module.exports = internals.Reporter = function (options) {
1717

1818
options.reporter.forEach((reporter, index) => {
1919

20-
const reporterOptions = cloneDeep(options);
20+
const reporterOptions = Hoek.clone(options);
2121
reporterOptions.reporter = reporter;
2222

2323
if (options.output[index] === 'stdout') {

‎lib/runner.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// Load modules
44

55
const Hoek = require('hoek');
6-
const { cloneDeep } = require('lodash');
76
const Seedrandom = require('seedrandom');
87
const WillCall = require('will-call');
98
const Reporters = require('./reporters');
@@ -264,7 +263,7 @@ internals.executeExperiments = async function (experiments, state, skip, parentC
264263
for (const experiment of experiments) {
265264
const skipExperiment = skip || experiment.options.skip || !internals.experimentHasTests(experiment, state) || (state.options.bail && state.report.failures);
266265

267-
state.currentContext = parentContext ? cloneDeep(parentContext) : {};
266+
state.currentContext = parentContext ? Hoek.clone(parentContext) : {};
268267

269268
// Before
270269

@@ -372,7 +371,7 @@ internals.executeTests = async function (experiment, state, skip) {
372371

373372
const start = Date.now();
374373
try {
375-
test.context = cloneDeep(state.currentContext);
374+
test.context = Hoek.clone(state.currentContext);
376375
await internals.protect(test, state);
377376
}
378377
catch (ex) {

‎package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@
1616
"espree": "4.1.x",
1717
"find-rc": "3.0.x",
1818
"handlebars": "4.x.x",
19-
"hoek": "6.x.x",
19+
"hoek": "^6.0.4",
2020
"json-stable-stringify": "1.x.x",
2121
"json-stringify-safe": "5.x.x",
22-
"lodash": "^4.17.x",
2322
"mkdirp": "0.5.x",
2423
"seedrandom": "2.4.x",
2524
"source-map": "0.7.x",
@@ -42,7 +41,7 @@
4241
"posttest": "npm run lint-md",
4342
"test-cov-html": "node ./bin/_lab -fL -r html -m 3000 -o coverage.html",
4443
"lint": "node ./bin/_lab -d -f -L",
45-
"lint-md": "eslint --config hapi --rule 'strict: 0, eol-last: 0' --plugin markdown --ext md --parser-options 'ecmaVersion: 9' ."
44+
"lint-md": "eslint --config hapi --rule \"strict: 0, eol-last: 0\" --plugin markdown --ext md --parser-options \"ecmaVersion: 9\" ."
4645
},
4746
"license": "BSD-3-Clause"
4847
}

0 commit comments

Comments
 (0)
Please sign in to comment.