Skip to content

Commit b288e2b

Browse files
greenkeeper[bot]pvdlg
authored andcommitted
chore(package): update ava to version 3.1.0
1 parent 249f525 commit b288e2b

13 files changed

+54
-54
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"parse-json": "^5.0.0"
2020
},
2121
"devDependencies": {
22-
"ava": "^2.0.0",
22+
"ava": "^3.1.0",
2323
"codecov": "^3.0.0",
2424
"nyc": "^15.0.0",
2525
"semantic-release": "^17.0.0",

test/add-channel.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import test from 'ava';
2-
import {stub} from 'sinon';
3-
import {WritableStreamBuffer} from 'stream-buffers';
4-
import {addChannel} from '..';
1+
const test = require('ava');
2+
const {stub} = require('sinon');
3+
const {WritableStreamBuffer} = require('stream-buffers');
4+
const {addChannel} = require('..');
55

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

54-
await t.throwsAsync(addChannel(pluginConfig, context), Error);
54+
await t.throwsAsync(addChannel(pluginConfig, context), {instanceOf: Error});
5555
});
5656

5757
test('Use "cmd" if defined and "addChannelCmd" is not', async t => {

test/analyze-commits.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import test from 'ava';
2-
import {stub} from 'sinon';
3-
import {WritableStreamBuffer} from 'stream-buffers';
4-
import {analyzeCommits} from '..';
1+
const test = require('ava');
2+
const {stub} = require('sinon');
3+
const {WritableStreamBuffer} = require('stream-buffers');
4+
const {analyzeCommits} = require('..');
55

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

35-
await t.throwsAsync(analyzeCommits(pluginConfig, context), Error);
35+
await t.throwsAsync(analyzeCommits(pluginConfig, context), {instanceOf: Error});
3636
});
3737

3838
test('Use "cmd" if defined and "analyzeCommitsCmd" is not', async t => {

test/exec.test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import path from 'path';
2-
import test from 'ava';
3-
import {stub} from 'sinon';
4-
import {WritableStreamBuffer} from 'stream-buffers';
5-
import exec from '../lib/exec';
1+
const path = require('path');
2+
const test = require('ava');
3+
const {stub} = require('sinon');
4+
const {WritableStreamBuffer} = require('stream-buffers');
5+
const exec = require('../lib/exec');
66

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

60-
test('Exececute the script in cmd from the relative in "execCwd"', async t => {
60+
test('Exececute the script in cmd = require(the relative in "execCwd"', async t => {
6161
const pluginConfig = {
6262
publishCmd: `./fixtures/echo-args.sh $PWD`,
6363
execCwd: 'test',

test/fail.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import test from 'ava';
2-
import {stub} from 'sinon';
3-
import {WritableStreamBuffer} from 'stream-buffers';
4-
import {fail} from '..';
1+
const test = require('ava');
2+
const {stub} = require('sinon');
3+
const {WritableStreamBuffer} = require('stream-buffers');
4+
const {fail} = require('..');
55

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

26-
await t.throwsAsync(fail(pluginConfig, context), Error);
26+
await t.throwsAsync(fail(pluginConfig, context), {instanceOf: Error});
2727
});
2828

2929
test('Use "cmd" if defined and "failCmd" is not', async t => {

test/generate-notes.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import test from 'ava';
2-
import {stub} from 'sinon';
3-
import {WritableStreamBuffer} from 'stream-buffers';
4-
import {generateNotes} from '..';
1+
const test = require('ava');
2+
const {stub} = require('sinon');
3+
const {WritableStreamBuffer} = require('stream-buffers');
4+
const {generateNotes} = require('..');
55

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

27-
await t.throwsAsync(generateNotes(pluginConfig, context), Error);
27+
await t.throwsAsync(generateNotes(pluginConfig, context), {instanceOf: Error});
2828
});
2929

3030
test('Use "cmd" if defined and "generateNotesCmd" is not', async t => {

test/integration.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import test from 'ava';
2-
import m from '..';
1+
const test = require('ava');
2+
const m = require('..');
33

44
test('Skip step if neither "cmd" nor step cmd is defined', async t => {
55
await t.notThrowsAsync(m.verifyConditions({}, {}));

test/prepare.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import test from 'ava';
2-
import {stub} from 'sinon';
3-
import {WritableStreamBuffer} from 'stream-buffers';
4-
import {prepare} from '..';
1+
const test = require('ava');
2+
const {stub} = require('sinon');
3+
const {WritableStreamBuffer} = require('stream-buffers');
4+
const {prepare} = require('..');
55

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

26-
await t.throwsAsync(prepare(pluginConfig, context), Error);
26+
await t.throwsAsync(prepare(pluginConfig, context), {instanceOf: Error});
2727
});
2828

2929
test('Use "cmd" if defined and "prepareCmd" is not', async t => {

test/publish.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import test from 'ava';
2-
import {stub} from 'sinon';
3-
import {WritableStreamBuffer} from 'stream-buffers';
4-
import {publish} from '..';
1+
const test = require('ava');
2+
const {stub} = require('sinon');
3+
const {WritableStreamBuffer} = require('stream-buffers');
4+
const {publish} = require('..');
55

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

54-
await t.throwsAsync(publish(pluginConfig, context), Error);
54+
await t.throwsAsync(publish(pluginConfig, context), {instanceOf: Error});
5555
});
5656

5757
test('Use "cmd" if defined and "publishCmd" is not', async t => {

test/success.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import test from 'ava';
2-
import {stub} from 'sinon';
3-
import {WritableStreamBuffer} from 'stream-buffers';
4-
import {success} from '..';
1+
const test = require('ava');
2+
const {stub} = require('sinon');
3+
const {WritableStreamBuffer} = require('stream-buffers');
4+
const {success} = require('..');
55

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

26-
await t.throwsAsync(success(pluginConfig, context), Error);
26+
await t.throwsAsync(success(pluginConfig, context), {instanceOf: Error});
2727
});
2828

2929
test('Use "cmd" if defined and "successCmd" is not', async t => {

0 commit comments

Comments
 (0)