Skip to content

Commit

Permalink
chore(package): update ava to version 3.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
greenkeeper[bot] authored and pvdlg committed Jan 27, 2020
1 parent 249f525 commit b288e2b
Show file tree
Hide file tree
Showing 13 changed files with 54 additions and 54 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -19,7 +19,7 @@
"parse-json": "^5.0.0"
},
"devDependencies": {
"ava": "^2.0.0",
"ava": "^3.1.0",
"codecov": "^3.0.0",
"nyc": "^15.0.0",
"semantic-release": "^17.0.0",
Expand Down
10 changes: 5 additions & 5 deletions test/add-channel.test.js
@@ -1,7 +1,7 @@
import test from 'ava';
import {stub} from 'sinon';
import {WritableStreamBuffer} from 'stream-buffers';
import {addChannel} from '..';
const test = require('ava');
const {stub} = require('sinon');
const {WritableStreamBuffer} = require('stream-buffers');
const {addChannel} = require('..');

test.beforeEach(t => {
t.context.stdout = new WritableStreamBuffer();
Expand Down Expand Up @@ -51,7 +51,7 @@ test('Throw "Error" if the addChannel script does not returns 0', async t => {
const pluginConfig = {addChannelCmd: 'exit 1'};
const context = {stdout: t.context.stdout, stderr: t.context.stderr, logger: t.context.logger, options: {}};

await t.throwsAsync(addChannel(pluginConfig, context), Error);
await t.throwsAsync(addChannel(pluginConfig, context), {instanceOf: Error});
});

test('Use "cmd" if defined and "addChannelCmd" is not', async t => {
Expand Down
10 changes: 5 additions & 5 deletions test/analyze-commits.test.js
@@ -1,7 +1,7 @@
import test from 'ava';
import {stub} from 'sinon';
import {WritableStreamBuffer} from 'stream-buffers';
import {analyzeCommits} from '..';
const test = require('ava');
const {stub} = require('sinon');
const {WritableStreamBuffer} = require('stream-buffers');
const {analyzeCommits} = require('..');

test.beforeEach(t => {
t.context.stdout = new WritableStreamBuffer();
Expand Down Expand Up @@ -32,7 +32,7 @@ test('Throw Error if if the analyzeCommits script does not returns 0', async t =
const pluginConfig = {analyzeCommitsCmd: 'exit 1'};
const context = {stdout: t.context.stdout, stderr: t.context.stderr, logger: t.context.logger};

await t.throwsAsync(analyzeCommits(pluginConfig, context), Error);
await t.throwsAsync(analyzeCommits(pluginConfig, context), {instanceOf: Error});
});

test('Use "cmd" if defined and "analyzeCommitsCmd" is not', async t => {
Expand Down
12 changes: 6 additions & 6 deletions test/exec.test.js
@@ -1,8 +1,8 @@
import path from 'path';
import test from 'ava';
import {stub} from 'sinon';
import {WritableStreamBuffer} from 'stream-buffers';
import exec from '../lib/exec';
const path = require('path');
const test = require('ava');
const {stub} = require('sinon');
const {WritableStreamBuffer} = require('stream-buffers');
const exec = require('../lib/exec');

test.beforeEach(t => {
t.context.stdout = new WritableStreamBuffer();
Expand Down Expand Up @@ -57,7 +57,7 @@ test('Execute the script in "cmd" if no step specific command is passed', async
t.is(result, 'run cmd');
});

test('Exececute the script in cmd from the relative in "execCwd"', async t => {
test('Exececute the script in cmd = require(the relative in "execCwd"', async t => {
const pluginConfig = {
publishCmd: `./fixtures/echo-args.sh $PWD`,
execCwd: 'test',
Expand Down
10 changes: 5 additions & 5 deletions test/fail.test.js
@@ -1,7 +1,7 @@
import test from 'ava';
import {stub} from 'sinon';
import {WritableStreamBuffer} from 'stream-buffers';
import {fail} from '..';
const test = require('ava');
const {stub} = require('sinon');
const {WritableStreamBuffer} = require('stream-buffers');
const {fail} = require('..');

test.beforeEach(t => {
t.context.stdout = new WritableStreamBuffer();
Expand All @@ -23,7 +23,7 @@ test('Throw "Error" if the fail script does not returns 0', async t => {
const pluginConfig = {failCmd: 'exit 1'};
const context = {stdout: t.context.stdout, stderr: t.context.stderr, logger: t.context.logger};

await t.throwsAsync(fail(pluginConfig, context), Error);
await t.throwsAsync(fail(pluginConfig, context), {instanceOf: Error});
});

test('Use "cmd" if defined and "failCmd" is not', async t => {
Expand Down
10 changes: 5 additions & 5 deletions test/generate-notes.test.js
@@ -1,7 +1,7 @@
import test from 'ava';
import {stub} from 'sinon';
import {WritableStreamBuffer} from 'stream-buffers';
import {generateNotes} from '..';
const test = require('ava');
const {stub} = require('sinon');
const {WritableStreamBuffer} = require('stream-buffers');
const {generateNotes} = require('..');

test.beforeEach(t => {
t.context.stdout = new WritableStreamBuffer();
Expand All @@ -24,7 +24,7 @@ test('Throw "Error" if if the generateNotes script does not returns 0', async t
const pluginConfig = {generateNotesCmd: 'exit 1'};
const context = {stdout: t.context.stdout, stderr: t.context.stderr, logger: t.context.logger};

await t.throwsAsync(generateNotes(pluginConfig, context), Error);
await t.throwsAsync(generateNotes(pluginConfig, context), {instanceOf: Error});
});

test('Use "cmd" if defined and "generateNotesCmd" is not', async t => {
Expand Down
4 changes: 2 additions & 2 deletions test/integration.test.js
@@ -1,5 +1,5 @@
import test from 'ava';
import m from '..';
const test = require('ava');
const m = require('..');

test('Skip step if neither "cmd" nor step cmd is defined', async t => {
await t.notThrowsAsync(m.verifyConditions({}, {}));
Expand Down
10 changes: 5 additions & 5 deletions test/prepare.test.js
@@ -1,7 +1,7 @@
import test from 'ava';
import {stub} from 'sinon';
import {WritableStreamBuffer} from 'stream-buffers';
import {prepare} from '..';
const test = require('ava');
const {stub} = require('sinon');
const {WritableStreamBuffer} = require('stream-buffers');
const {prepare} = require('..');

test.beforeEach(t => {
t.context.stdout = new WritableStreamBuffer();
Expand All @@ -23,7 +23,7 @@ test('Throw "Error" if the prepare script does not returns 0', async t => {
const pluginConfig = {prepareCmd: 'exit 1'};
const context = {stdout: t.context.stdout, stderr: t.context.stderr, logger: t.context.logger};

await t.throwsAsync(prepare(pluginConfig, context), Error);
await t.throwsAsync(prepare(pluginConfig, context), {instanceOf: Error});
});

test('Use "cmd" if defined and "prepareCmd" is not', async t => {
Expand Down
10 changes: 5 additions & 5 deletions test/publish.test.js
@@ -1,7 +1,7 @@
import test from 'ava';
import {stub} from 'sinon';
import {WritableStreamBuffer} from 'stream-buffers';
import {publish} from '..';
const test = require('ava');
const {stub} = require('sinon');
const {WritableStreamBuffer} = require('stream-buffers');
const {publish} = require('..');

test.beforeEach(t => {
t.context.stdout = new WritableStreamBuffer();
Expand Down Expand Up @@ -51,7 +51,7 @@ test('Throw "Error" if the publish script does not returns 0', async t => {
const pluginConfig = {publishCmd: 'exit 1'};
const context = {stdout: t.context.stdout, stderr: t.context.stderr, logger: t.context.logger, options: {}};

await t.throwsAsync(publish(pluginConfig, context), Error);
await t.throwsAsync(publish(pluginConfig, context), {instanceOf: Error});
});

test('Use "cmd" if defined and "publishCmd" is not', async t => {
Expand Down
10 changes: 5 additions & 5 deletions test/success.test.js
@@ -1,7 +1,7 @@
import test from 'ava';
import {stub} from 'sinon';
import {WritableStreamBuffer} from 'stream-buffers';
import {success} from '..';
const test = require('ava');
const {stub} = require('sinon');
const {WritableStreamBuffer} = require('stream-buffers');
const {success} = require('..');

test.beforeEach(t => {
t.context.stdout = new WritableStreamBuffer();
Expand All @@ -23,7 +23,7 @@ test('Throw "Error" if the success script does not returns 0', async t => {
const pluginConfig = {successCmd: 'exit 1'};
const context = {stdout: t.context.stdout, stderr: t.context.stderr, logger: t.context.logger};

await t.throwsAsync(success(pluginConfig, context), Error);
await t.throwsAsync(success(pluginConfig, context), {instanceOf: Error});
});

test('Use "cmd" if defined and "successCmd" is not', async t => {
Expand Down
4 changes: 2 additions & 2 deletions test/verify-config.test.js
@@ -1,5 +1,5 @@
import test from 'ava';
import verify from '../lib/verify-config';
const test = require('ava');
const verify = require('../lib/verify-config');

test('Verify "cmd", "shell" and "execCwd" options', t => {
t.notThrows(() => verify('verifyConditionsCmd', {verifyConditionsCmd: 'shell cmd'}));
Expand Down
8 changes: 4 additions & 4 deletions test/verify-confitions.test.js
@@ -1,7 +1,7 @@
import test from 'ava';
import {stub} from 'sinon';
import {WritableStreamBuffer} from 'stream-buffers';
import {verifyConditions} from '..';
const test = require('ava');
const {stub} = require('sinon');
const {WritableStreamBuffer} = require('stream-buffers');
const {verifyConditions} = require('..');

test.beforeEach(t => {
t.context.stdout = new WritableStreamBuffer();
Expand Down
8 changes: 4 additions & 4 deletions test/verify-release.test.js
@@ -1,7 +1,7 @@
import test from 'ava';
import {stub} from 'sinon';
import {WritableStreamBuffer} from 'stream-buffers';
import {verifyRelease} from '..';
const test = require('ava');
const {stub} = require('sinon');
const {WritableStreamBuffer} = require('stream-buffers');
const {verifyRelease} = require('..');

test.beforeEach(t => {
t.context.stdout = new WritableStreamBuffer();
Expand Down

0 comments on commit b288e2b

Please sign in to comment.