Skip to content

Commit

Permalink
Fix imports in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Jul 21, 2021
1 parent 7ab8574 commit e7e664c
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 12 deletions.
3 changes: 2 additions & 1 deletion test/git.init.js
Expand Up @@ -2,7 +2,8 @@ import test from 'ava';
import sh from 'shelljs';
import Shell from '../lib/shell.js';
import Git from '../lib/plugin/git/Git.js';
import { factory, readJSON } from '../lib/util.js';
import { readJSON } from '../lib/util.js';
import { factory } from './util/index.js';
import { mkTmpDir, gitAdd } from './util/helpers.js';

const { git } = readJSON(new URL('../config/release-it.json', import.meta.url));
Expand Down
2 changes: 1 addition & 1 deletion test/git.js
Expand Up @@ -3,8 +3,8 @@ import test from 'ava';
import sinon from 'sinon';
import sh from 'shelljs';
import Git from '../lib/plugin/git/Git.js';
import { factory } from './util/index.js';
import { mkTmpDir, readFile, gitAdd } from './util/helpers.js';
import { factory } from './util.js';

test.beforeEach(() => {
const tmp = mkTmpDir();
Expand Down
4 changes: 2 additions & 2 deletions test/github.js
Expand Up @@ -2,15 +2,15 @@ import test from 'ava';
import sinon from 'sinon';
import { RequestError } from '@octokit/request-error';
import GitHub from '../lib/plugin/github/GitHub.js';
import { factory, runTasks } from './util.js';
import { factory, runTasks } from './util/index.js';
import {
interceptAuthentication,
interceptCollaborator,
interceptListReleases,
interceptCreate,
interceptUpdate,
interceptAsset
} from './stub/github';
} from './stub/github.js';

const tokenRef = 'GITHUB_TOKEN';
const pushRepo = 'git://github.com:user/repo';
Expand Down
4 changes: 2 additions & 2 deletions test/gitlab.js
Expand Up @@ -2,14 +2,14 @@ import test from 'ava';
import sinon from 'sinon';
import nock from 'nock';
import GitLab from '../lib/plugin/gitlab/GitLab.js';
import { factory, runTasks } from './util/index.js';
import {
interceptUser,
interceptCollaborator,
interceptCollaboratorFallback,
interceptPublish,
interceptAsset
} from './stub/gitlab';
import { factory, runTasks } from './util.js';
} from './stub/gitlab.js';

const tokenHeader = 'Private-Token';
const tokenRef = 'GITLAB_TOKEN';
Expand Down
2 changes: 1 addition & 1 deletion test/npm.js
Expand Up @@ -3,7 +3,7 @@ import test from 'ava';
import sinon from 'sinon';
import mock from 'mock-fs';
import npm from '../lib/plugin/npm/npm.js';
import { factory, runTasks } from './util.js';
import { factory, runTasks } from './util/index.js';
import { getArgs } from './util/helpers.js';

test('should return npm package url', t => {
Expand Down
2 changes: 1 addition & 1 deletion test/prompt.js
Expand Up @@ -6,7 +6,7 @@ import git from '../lib/plugin/git/prompts.js';
import github from '../lib/plugin/github/prompts.js';
import gitlab from '../lib/plugin/gitlab/prompts.js';
import npm from '../lib/plugin/npm/prompts.js';
import { factory } from './util.js';
import { factory } from './util/index.js';

const prompts = { git, github, gitlab, npm };

Expand Down
2 changes: 1 addition & 1 deletion test/shell.js
Expand Up @@ -3,7 +3,7 @@ import sh from 'shelljs';
import sinon from 'sinon';
import Shell from '../lib/shell.js';
import Log from '../lib/log.js';
import { factory } from './util.js';
import { factory } from './util/index.js';

const { stdout } = sh.exec('pwd');
const cwd = stdout.trim();
Expand Down
4 changes: 2 additions & 2 deletions test/tasks.js
Expand Up @@ -16,13 +16,13 @@ import {
interceptCollaborator as interceptGitLabCollaborator,
interceptPublish as interceptGitLabPublish,
interceptAsset as interceptGitLabAsset
} from './stub/gitlab';
} from './stub/gitlab.js';
import {
interceptAuthentication as interceptGitHubAuthentication,
interceptCollaborator as interceptGitHubCollaborator,
interceptCreate as interceptGitHubCreate,
interceptAsset as interceptGitHubAsset
} from './stub/github';
} from './stub/github.js';

const noop = Promise.resolve();

Expand Down
2 changes: 1 addition & 1 deletion test/version.js
@@ -1,7 +1,7 @@
import test from 'ava';
import sinon from 'sinon';
import Version from '../lib/plugin/version/Version.js';
import { factory, runTasks } from './util.js';
import { factory, runTasks } from './util/index.js';

test('isValidVersion', t => {
const v = factory(Version);
Expand Down

0 comments on commit e7e664c

Please sign in to comment.