From 4d0490122c44b06a2ff16371c6c1ab838c4c3cf3 Mon Sep 17 00:00:00 2001 From: Pierre Vanduynslager Date: Thu, 15 Feb 2018 00:25:26 -0500 Subject: [PATCH] style: lint --- test/plugins/pipeline.test.js | 8 ++++---- test/plugins/plugins.test.js | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/plugins/pipeline.test.js b/test/plugins/pipeline.test.js index 4af1abbd..97cfc4be 100644 --- a/test/plugins/pipeline.test.js +++ b/test/plugins/pipeline.test.js @@ -118,7 +118,7 @@ test('Throw all errors from the first step throwing an AggregateError', async t const errors = await t.throws(pipeline([step1, step2, step3])(0)); - t.deepEqual(Array.from(errors), [error1, error2]); + t.deepEqual([...errors], [error1, error2]); t.true(step1.calledWith(0)); t.true(step2.calledWith(0)); t.true(step3.notCalled); @@ -133,7 +133,7 @@ test('Execute all even if a Promise rejects', async t => { const errors = await t.throws(pipeline([step1, step2, step3])(0, {settleAll: true})); - t.deepEqual(Array.from(errors), [error1, error2]); + t.deepEqual([...errors], [error1, error2]); t.true(step1.calledWith(0)); t.true(step2.calledWith(0)); t.true(step3.calledWith(0)); @@ -149,7 +149,7 @@ test('Throw all errors from all steps throwing an AggregateError', async t => { const errors = await t.throws(pipeline([step1, step2])(0, {settleAll: true})); - t.deepEqual(Array.from(errors), [error1, error2, error3, error4]); + t.deepEqual([...errors], [error1, error2, error3, error4]); t.true(step1.calledWith(0)); t.true(step2.calledWith(0)); }); @@ -165,7 +165,7 @@ test('Execute each function in series passing a transformed input even if a step const errors = await t.throws(pipeline([step1, step2, step3, step4])(0, {settleAll: true, getNextInput})); - t.deepEqual(Array.from(errors), [error2, error3]); + t.deepEqual([...errors], [error2, error3]); t.true(step1.calledWith(0)); t.true(step2.calledWith(0 + 1)); t.true(step3.calledWith(0 + 1 + error2)); diff --git a/test/plugins/plugins.test.js b/test/plugins/plugins.test.js index c4aee490..ba976f6b 100644 --- a/test/plugins/plugins.test.js +++ b/test/plugins/plugins.test.js @@ -136,16 +136,16 @@ test('Merge global options with plugin options', async t => { }); test('Throw an error if plugins configuration are missing a path for plugin pipeline', t => { - const errors = Array.from(t.throws(() => getPlugins({verifyConditions: {}}, {}, t.context.logger))); + const errors = [...t.throws(() => getPlugins({verifyConditions: {}}, {}, t.context.logger))]; t.is(errors[0].name, 'SemanticReleaseError'); t.is(errors[0].code, 'EPLUGINCONF'); }); test('Throw an error if an array of plugin configuration is missing a path for plugin pipeline', t => { - const errors = Array.from( - t.throws(() => getPlugins({verifyConditions: [{path: '@semantic-release/npm'}, {}]}, {}, t.context.logger)) - ); + const errors = [ + ...t.throws(() => getPlugins({verifyConditions: [{path: '@semantic-release/npm'}, {}]}, {}, t.context.logger)), + ]; t.is(errors[0].name, 'SemanticReleaseError'); t.is(errors[0].code, 'EPLUGINCONF');