From b288e2bf4b268ee60330aef14261a22f15e73f81 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" <23040076+greenkeeper[bot]@users.noreply.github.com> Date: Sun, 19 Jan 2020 15:20:19 +0000 Subject: [PATCH] chore(package): update ava to version 3.1.0 --- package.json | 2 +- test/add-channel.test.js | 10 +++++----- test/analyze-commits.test.js | 10 +++++----- test/exec.test.js | 12 ++++++------ test/fail.test.js | 10 +++++----- test/generate-notes.test.js | 10 +++++----- test/integration.test.js | 4 ++-- test/prepare.test.js | 10 +++++----- test/publish.test.js | 10 +++++----- test/success.test.js | 10 +++++----- test/verify-config.test.js | 4 ++-- test/verify-confitions.test.js | 8 ++++---- test/verify-release.test.js | 8 ++++---- 13 files changed, 54 insertions(+), 54 deletions(-) diff --git a/package.json b/package.json index aefd912f..bd21d30b 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/test/add-channel.test.js b/test/add-channel.test.js index a73c6d20..c24fd570 100644 --- a/test/add-channel.test.js +++ b/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(); @@ -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 => { diff --git a/test/analyze-commits.test.js b/test/analyze-commits.test.js index 585a6238..1e3f0611 100644 --- a/test/analyze-commits.test.js +++ b/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(); @@ -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 => { diff --git a/test/exec.test.js b/test/exec.test.js index 90848ae5..150b4f82 100644 --- a/test/exec.test.js +++ b/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(); @@ -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', diff --git a/test/fail.test.js b/test/fail.test.js index 566d8e8d..2f620ebe 100644 --- a/test/fail.test.js +++ b/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(); @@ -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 => { diff --git a/test/generate-notes.test.js b/test/generate-notes.test.js index 22762a29..f1cf6fdb 100644 --- a/test/generate-notes.test.js +++ b/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(); @@ -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 => { diff --git a/test/integration.test.js b/test/integration.test.js index 436613a8..5c9ad8e7 100644 --- a/test/integration.test.js +++ b/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({}, {})); diff --git a/test/prepare.test.js b/test/prepare.test.js index 8f036511..6f7de588 100644 --- a/test/prepare.test.js +++ b/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(); @@ -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 => { diff --git a/test/publish.test.js b/test/publish.test.js index 473b4607..73d7ddd9 100644 --- a/test/publish.test.js +++ b/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(); @@ -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 => { diff --git a/test/success.test.js b/test/success.test.js index f78016c6..d9daae45 100644 --- a/test/success.test.js +++ b/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(); @@ -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 => { diff --git a/test/verify-config.test.js b/test/verify-config.test.js index 75e987f0..848e55ae 100644 --- a/test/verify-config.test.js +++ b/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'})); diff --git a/test/verify-confitions.test.js b/test/verify-confitions.test.js index b25af1fb..57e72b94 100644 --- a/test/verify-confitions.test.js +++ b/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(); diff --git a/test/verify-release.test.js b/test/verify-release.test.js index 7695121b..cfe19c5d 100644 --- a/test/verify-release.test.js +++ b/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();