Skip to content

Commit eeb636d

Browse files
greenkeeper[bot]pvdlg
authored andcommitted
chore(package): update ava to version 3.1.0
1 parent 3242d9f commit eeb636d

15 files changed

+96
-95
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"version": "0.0.0-development",
55
"author": "Pierre Vanduynslager (https://twitter.com/@pvdlg_)",
66
"ava": {
7-
"helpers": [
8-
"test/helpers/**/*"
7+
"files": [
8+
"test/**/*.test.js"
99
]
1010
},
1111
"bugs": {
@@ -34,7 +34,7 @@
3434
"url-join": "^4.0.0"
3535
},
3636
"devDependencies": {
37-
"ava": "^2.0.0",
37+
"ava": "^3.1.0",
3838
"clear-module": "^4.0.0",
3939
"codecov": "^3.5.0",
4040
"nock": "^11.1.0",

test/add-channel.test.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
import test from 'ava';
2-
import nock from 'nock';
3-
import {stub} from 'sinon';
4-
import proxyquire from 'proxyquire';
5-
import {authenticate} from './helpers/mock-github';
6-
import rateLimit from './helpers/rate-limit';
1+
const test = require('ava');
2+
const nock = require('nock');
3+
const {stub} = require('sinon');
4+
const proxyquire = require('proxyquire');
5+
const {authenticate} = require('./helpers/mock-github');
6+
const rateLimit = require('./helpers/rate-limit');
77

88
/* eslint camelcase: ["error", {properties: "never"}] */
99

10-
// const cwd = 'test/fixtures/files';
1110
const addChannel = proxyquire('../lib/add-channel', {
1211
'./get-client': proxyquire('../lib/get-client', {'./definitions/rate-limit': rateLimit}),
1312
});

test/fail.test.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import {escape} from 'querystring';
2-
import test from 'ava';
3-
import nock from 'nock';
4-
import {stub} from 'sinon';
5-
import proxyquire from 'proxyquire';
6-
import SemanticReleaseError from '@semantic-release/error';
7-
import {ISSUE_ID} from '../lib/definitions/constants';
8-
import {authenticate} from './helpers/mock-github';
9-
import rateLimit from './helpers/rate-limit';
1+
const {escape} = require('querystring');
2+
const test = require('ava');
3+
const nock = require('nock');
4+
const {stub} = require('sinon');
5+
const proxyquire = require('proxyquire');
6+
const SemanticReleaseError = require('@semantic-release/error');
7+
const {ISSUE_ID} = require('../lib/definitions/constants');
8+
const {authenticate} = require('./helpers/mock-github');
9+
const rateLimit = require('./helpers/rate-limit');
1010

1111
/* eslint camelcase: ["error", {properties: "never"}] */
1212

test/find-sr-issue.test.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import {escape} from 'querystring';
2-
import test from 'ava';
3-
import nock from 'nock';
4-
import {stub} from 'sinon';
5-
import proxyquire from 'proxyquire';
6-
import {ISSUE_ID} from '../lib/definitions/constants';
7-
import findSRIssues from '../lib/find-sr-issues';
8-
import {authenticate} from './helpers/mock-github';
9-
import rateLimit from './helpers/rate-limit';
1+
const {escape} = require('querystring');
2+
const test = require('ava');
3+
const nock = require('nock');
4+
const {stub} = require('sinon');
5+
const proxyquire = require('proxyquire');
6+
const {ISSUE_ID} = require('../lib/definitions/constants');
7+
const findSRIssues = require('../lib/find-sr-issues');
8+
const {authenticate} = require('./helpers/mock-github');
9+
const rateLimit = require('./helpers/rate-limit');
1010

1111
const githubToken = 'github_token';
1212
const client = proxyquire('../lib/get-client', {'./definitions/rate-limit': rateLimit})({githubToken});

test/get-client.test.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
import path from 'path';
2-
import http from 'http';
3-
import https from 'https';
4-
import {promisify} from 'util';
5-
import {readFile} from 'fs-extra';
6-
import test from 'ava';
7-
import {inRange} from 'lodash';
8-
import {stub, spy} from 'sinon';
9-
import proxyquire from 'proxyquire';
10-
import Proxy from 'proxy';
11-
import serverDestroy from 'server-destroy';
12-
import Octokit from '@octokit/rest';
13-
import rateLimit from './helpers/rate-limit';
1+
const path = require('path');
2+
const http = require('http');
3+
const https = require('https');
4+
const {promisify} = require('util');
5+
const {readFile} = require('fs-extra');
6+
const test = require('ava');
7+
const {inRange} = require('lodash');
8+
const {stub, spy} = require('sinon');
9+
const proxyquire = require('proxyquire');
10+
const Proxy = require('proxy');
11+
const serverDestroy = require('server-destroy');
12+
const Octokit = require('@octokit/rest');
13+
const rateLimit = require('./helpers/rate-limit');
1414

1515
const getClient = proxyquire('../lib/get-client', {'./definitions/rate-limit': rateLimit});
1616

test/get-fail-comment.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import test from 'ava';
2-
import SemanticReleaseError from '@semantic-release/error';
3-
import getfailComment from '../lib/get-fail-comment';
1+
const test = require('ava');
2+
const SemanticReleaseError = require('@semantic-release/error');
3+
const getfailComment = require('../lib/get-fail-comment');
44

55
test('Comment with mutiple errors', t => {
66
const errors = [

test/get-search-queries.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import test from 'ava';
2-
import {repeat} from 'lodash';
3-
import getSearchQueries from '../lib/get-search-queries';
1+
const test = require('ava');
2+
const {repeat} = require('lodash');
3+
const getSearchQueries = require('../lib/get-search-queries');
44

55
test('Generate queries of 256 characters maximum', t => {
66
const commits = [

test/get-success-comment.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 getSuccessComment from '../lib/get-success-comment';
1+
const test = require('ava');
2+
const getSuccessComment = require('../lib/get-success-comment');
33

44
const HOME_URL = 'https://github.com/semantic-release/semantic-release';
55

test/glob-assets.test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import path from 'path';
2-
import test from 'ava';
3-
import {copy, ensureDir} from 'fs-extra';
4-
import {isPlainObject, sortBy} from 'lodash';
5-
import tempy from 'tempy';
6-
import globAssets from '../lib/glob-assets';
1+
const path = require('path');
2+
const test = require('ava');
3+
const {copy, ensureDir} = require('fs-extra');
4+
const {isPlainObject, sortBy} = require('lodash');
5+
const tempy = require('tempy');
6+
const globAssets = require('../lib/glob-assets');
77

88
const sortAssets = assets => sortBy(assets, asset => (isPlainObject(asset) ? asset.path : asset));
99

test/helpers/mock-github.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import nock from 'nock';
1+
const nock = require('nock');
22

33
/**
44
* Return a `nock` object setup to respond to a github authentication request. Other expectation and responses can be chained.
@@ -9,7 +9,7 @@ import nock from 'nock';
99
* @param {String} [githubApiPathPrefix=env.GH_PREFIX || env.GITHUB_PREFIX || ''] The GitHub Enterprise API prefix.
1010
* @return {Object} A `nock` object ready to respond to a github authentication request.
1111
*/
12-
export function authenticate(
12+
function authenticate(
1313
env = {},
1414
{
1515
githubToken = env.GH_TOKEN || env.GITHUB_TOKEN || 'GH_TOKEN',
@@ -28,7 +28,7 @@ export function authenticate(
2828
* @param {String} [uploadUrl] The url on which to intercept http requests.
2929
* @return {Object} A `nock` object ready to respond to a github file upload request.
3030
*/
31-
export function upload(
31+
function upload(
3232
env = {},
3333
{
3434
githubToken = env.GH_TOKEN || env.GITHUB_TOKEN || 'GH_TOKEN',
@@ -41,3 +41,5 @@ export function upload(
4141
reqheaders: {Authorization: `token ${githubToken}`, 'content-type': contentType, 'content-length': contentLength},
4242
});
4343
}
44+
45+
module.exports = {authenticate, upload};

0 commit comments

Comments
 (0)