Skip to content

Commit 9f52d19

Browse files
greenkeeper[bot]pvdlg
authored andcommitted
chore(package): update ava to version 3.1.0
1 parent c2c47af commit 9f52d19

File tree

8 files changed

+38
-41
lines changed

8 files changed

+38
-41
lines changed

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
"ava": {
77
"files": [
88
"test/**/*.test.js"
9-
],
10-
"helpers": [
11-
"test/helpers/**/*"
129
]
1310
},
1411
"bugs": {
@@ -33,7 +30,7 @@
3330
"url-join": "^4.0.0"
3431
},
3532
"devDependencies": {
36-
"ava": "^2.0.0",
33+
"ava": "^3.1.0",
3734
"clear-module": "^4.0.0",
3835
"codecov": "^3.0.0",
3936
"nock": "^11.0.0",

test/get-repo-id.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import test from 'ava';
2-
import getRepoId from '../lib/get-repo-id';
1+
const test = require('ava');
2+
const getRepoId = require('../lib/get-repo-id');
33

44
test('Parse repo id with https URL', t => {
55
t.is(getRepoId({env: {}}, 'https://gitlbab.com', 'https://gitlab.com/owner/repo.git'), 'owner/repo');
@@ -35,7 +35,7 @@ test('Parse repo id with organization and subgroup', t => {
3535
);
3636
});
3737

38-
test('Get repo id from GitLab CI', t => {
38+
test('Get repo id = require(GitLab CI', t => {
3939
t.is(
4040
getRepoId(
4141
{envCi: {service: 'gitlab'}, env: {CI_PROJECT_PATH: 'other-owner/other-repo'}},

test/glob-assets.test.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
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

1010
const fixtures = 'test/fixtures/files';
1111

12-
test('Retrieve file from single path', async t => {
12+
test('Retrieve file = require(single path', async t => {
1313
const cwd = tempy.directory();
1414
await copy(fixtures, cwd);
1515
const globbedAssets = await globAssets({cwd}, ['upload.txt']);
1616

1717
t.deepEqual(globbedAssets, ['upload.txt']);
1818
});
1919

20-
test('Retrieve multiple files from path', async t => {
20+
test('Retrieve multiple files = require(path', async t => {
2121
const cwd = tempy.directory();
2222
await copy(fixtures, cwd);
2323
const globbedAssets = await globAssets({cwd}, ['upload.txt', 'upload_other.txt']);
@@ -33,7 +33,7 @@ test('Include missing files as defined, using Object definition', async t => {
3333
t.deepEqual(sortAssets(globbedAssets), sortAssets(['upload.txt', {path: 'miss*.txt', label: 'Missing'}]));
3434
});
3535

36-
test('Retrieve multiple files from Object', async t => {
36+
test('Retrieve multiple files = require(Object', async t => {
3737
const cwd = tempy.directory();
3838
await copy(fixtures, cwd);
3939
const globbedAssets = await globAssets({cwd}, [
@@ -84,15 +84,15 @@ test('Favor Object over String values when removing duplicates', async t => {
8484
);
8585
});
8686

87-
test('Retrieve file from single glob', async t => {
87+
test('Retrieve file = require(single glob', async t => {
8888
const cwd = tempy.directory();
8989
await copy(fixtures, cwd);
9090
const globbedAssets = await globAssets({cwd}, ['upload.*']);
9191

9292
t.deepEqual(globbedAssets, ['upload.txt']);
9393
});
9494

95-
test('Retrieve multiple files from single glob', async t => {
95+
test('Retrieve multiple files = require(single glob', async t => {
9696
const cwd = tempy.directory();
9797
await copy(fixtures, cwd);
9898
const globbedAssets = await globAssets({cwd}, ['*.txt']);

test/helpers/mock-gitlab.js

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

44
/**
55
* Retun a `nock` object setup to respond to a GitLab authentication request. Other expectation and responses can be chained.
@@ -10,7 +10,7 @@ import urlJoin from 'url-join';
1010
* @param {String} [gitlabApiPathPrefix=env.GL_PREFIX || env.GITLAB_PREFIX || ''] The GitHub Enterprise API prefix.
1111
* @return {Object} A `nock` object ready to respond to a github authentication request.
1212
*/
13-
export default function authenticate(
13+
module.exports = function(
1414
env = {},
1515
{
1616
gitlabToken = env.GL_TOKEN || env.GITLAB_TOKEN || 'GL_TOKEN',
@@ -23,4 +23,4 @@ export default function authenticate(
2323
} = {}
2424
) {
2525
return nock(urlJoin(gitlabUrl, gitlabApiPathPrefix), {reqheaders: {'Private-Token': gitlabToken}});
26-
}
26+
};

test/integration.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import test from 'ava';
2-
import nock from 'nock';
3-
import {stub} from 'sinon';
4-
import clearModule from 'clear-module';
5-
import authenticate from './helpers/mock-gitlab';
1+
const test = require('ava');
2+
const nock = require('nock');
3+
const {stub} = require('sinon');
4+
const clearModule = require('clear-module');
5+
const authenticate = require('./helpers/mock-gitlab');
66

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

test/publish.test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import test from 'ava';
2-
import nock from 'nock';
3-
import tempy from 'tempy';
4-
import {stub} from 'sinon';
5-
import publish from '../lib/publish';
6-
import authenticate from './helpers/mock-gitlab';
1+
const test = require('ava');
2+
const nock = require('nock');
3+
const tempy = require('tempy');
4+
const {stub} = require('sinon');
5+
const publish = require('../lib/publish');
6+
const authenticate = require('./helpers/mock-gitlab');
77

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

test/resolve-config.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 urlJoin from 'url-join';
3-
import resolveConfig from '../lib/resolve-config';
1+
const test = require('ava');
2+
const urlJoin = require('url-join');
3+
const resolveConfig = require('../lib/resolve-config');
44

55
test('Returns user config', t => {
66
const gitlabToken = 'TOKEN';

test/verify.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import test from 'ava';
2-
import nock from 'nock';
3-
import {stub} from 'sinon';
4-
import verify from '../lib/verify';
5-
import authenticate from './helpers/mock-gitlab';
1+
const test = require('ava');
2+
const nock = require('nock');
3+
const {stub} = require('sinon');
4+
const verify = require('../lib/verify');
5+
const authenticate = require('./helpers/mock-gitlab');
66

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

0 commit comments

Comments
 (0)