Skip to content

Commit

Permalink
style: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdlg committed Feb 16, 2018
1 parent aa724e8 commit 4d04901
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions test/plugins/pipeline.test.js
Expand Up @@ -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);
Expand All @@ -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));
Expand All @@ -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));
});
Expand All @@ -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));
Expand Down
8 changes: 4 additions & 4 deletions test/plugins/plugins.test.js
Expand Up @@ -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');
Expand Down

0 comments on commit 4d04901

Please sign in to comment.