diff --git a/lib/util.js b/lib/util.js index a0f8ee1a..43d69fc3 100644 --- a/lib/util.js +++ b/lib/util.js @@ -87,4 +87,15 @@ const parseVersion = raw => { const e = (message, docs) => new Error(docs ? `${message}${EOL}Documentation: ${docs}${EOL}` : message); -export { getSystemInfo, clean, format, truncateLines, rejectAfter, reduceUntil, parseGitUrl, hasAccess, parseVersion, e }; +export { + getSystemInfo, + clean, + format, + truncateLines, + rejectAfter, + reduceUntil, + parseGitUrl, + hasAccess, + parseVersion, + e +}; diff --git a/test/github.js b/test/github.js index b302e3ae..977c6e09 100644 --- a/test/github.js +++ b/test/github.js @@ -3,7 +3,14 @@ import sinon from 'sinon'; import { RequestError } from '@octokit/request-error'; import GitHub from '../lib/plugin/github/GitHub'; import { factory, runTasks } from './util'; -import { interceptAuthentication, interceptCollaborator, interceptListReleases, interceptCreate, interceptUpdate, interceptAsset } from './stub/github'; +import { + interceptAuthentication, + interceptCollaborator, + interceptListReleases, + interceptCreate, + interceptUpdate, + interceptAsset +} from './stub/github'; const tokenRef = 'GITHUB_TOKEN'; const pushRepo = 'git://github.com:user/repo'; diff --git a/test/gitlab.js b/test/gitlab.js index 91faf270..78a0308f 100644 --- a/test/gitlab.js +++ b/test/gitlab.js @@ -2,7 +2,13 @@ import test from 'ava'; import sinon from 'sinon'; import nock from 'nock'; import GitLab from '../lib/plugin/gitlab/GitLab'; -import { interceptUser, interceptCollaborator, interceptCollaboratorFallback, interceptPublish, interceptAsset } from './stub/gitlab'; +import { + interceptUser, + interceptCollaborator, + interceptCollaboratorFallback, + interceptPublish, + interceptAsset +} from './stub/gitlab'; import { factory, runTasks } from './util'; const tokenHeader = 'Private-Token'; diff --git a/test/stub/github.js b/test/stub/github.js index bc9f3f69..e5bb9dd1 100644 --- a/test/stub/github.js +++ b/test/stub/github.js @@ -104,4 +104,11 @@ const interceptAsset = ({ }; }); -export { interceptAuthentication, interceptCollaborator, interceptListReleases, interceptCreate, interceptUpdate, interceptAsset }; +export { + interceptAuthentication, + interceptCollaborator, + interceptListReleases, + interceptCreate, + interceptUpdate, + interceptAsset +}; diff --git a/test/stub/gitlab.js b/test/stub/gitlab.js index 0e372a1c..566a2e9c 100644 --- a/test/stub/gitlab.js +++ b/test/stub/gitlab.js @@ -19,10 +19,8 @@ export let interceptCollaboratorFallback = ( .get(`/api/v4/projects/${group ? `${group}%2F` : ''}${owner}%2F${project}/members/${userId}`) .reply(200, { id: userId, username: owner, access_level: 30 }); -export let interceptPublish = ( - { host = 'https://gitlab.com', owner = 'user', project = 'repo', body } = {}, - options -) => nock(host, options).post(`/api/v4/projects/${owner}%2F${project}/releases`, body).reply(200, {}); +export let interceptPublish = ({ host = 'https://gitlab.com', owner = 'user', project = 'repo', body } = {}, options) => + nock(host, options).post(`/api/v4/projects/${owner}%2F${project}/releases`, body).reply(200, {}); export let interceptAsset = ({ host = 'https://gitlab.com', owner = 'user', project = 'repo' } = {}) => nock(host) diff --git a/test/tasks.js b/test/tasks.js index d161ff12..a17b4530 100644 --- a/test/tasks.js +++ b/test/tasks.js @@ -11,8 +11,18 @@ import runTasks from '../lib/tasks'; import Plugin from '../lib/plugin/Plugin'; import { mkTmpDir, gitAdd, getArgs } from './util/helpers'; import ShellStub from './stub/shell'; -import { interceptUser as interceptGitLabUser, interceptCollaborator as interceptGitLabCollaborator, interceptPublish as interceptGitLabPublish, interceptAsset as interceptGitLabAsset } from './stub/gitlab'; -import { interceptAuthentication as interceptGitHubAuthentication, interceptCollaborator as interceptGitHubCollaborator, interceptCreate as interceptGitHubCreate, interceptAsset as interceptGitHubAsset } from './stub/github'; +import { + interceptUser as interceptGitLabUser, + interceptCollaborator as interceptGitLabCollaborator, + interceptPublish as interceptGitLabPublish, + interceptAsset as interceptGitLabAsset +} from './stub/gitlab'; +import { + interceptAuthentication as interceptGitHubAuthentication, + interceptCollaborator as interceptGitHubCollaborator, + interceptCreate as interceptGitHubCreate, + interceptAsset as interceptGitHubAsset +} from './stub/github'; const noop = Promise.resolve();