Skip to content

Commit 84a85fa

Browse files
committed
style: move tests into colocation
1 parent 30ceabe commit 84a85fa

11 files changed

+20
-20
lines changed

test/integration/get-configuration.js renamed to source/library/get-configuration.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import path from 'path';
22
import test from 'ava';
33
import expect from 'unexpected';
44

5-
import getConfiguration from '../../source/library/get-configuration';
5+
import getConfiguration from './get-configuration';
66

77
const cwd = process.cwd();
88

test/integration/get-messages.js renamed to source/library/get-messages.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import exists from 'path-exists';
1010
import rimraf from 'rimraf';
1111
import expect from 'unexpected';
1212

13-
import getMessages from '../../source/library/get-messages';
13+
import getMessages from './get-messages';
1414
import pkg from '../../package';
1515

1616
const rm = denodeify(rimraf);

test/rules/body-empty.js renamed to source/rules/body-empty.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import test from 'ava';
2-
import parse from '../../source/library/parse';
3-
import bodyEmpty from '../../source/rules/body-empty';
2+
import parse from '../library/parse';
3+
import bodyEmpty from './body-empty';
44

55
const messages = {
66
empty: 'chore: subject',

test/rules/footer-empty.js renamed to source/rules/footer-empty.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import test from 'ava';
2-
import parse from '../../source/library/parse';
3-
import footerEmpty from '../../source/rules/footer-empty';
2+
import parse from '../library/parse';
3+
import footerEmpty from './footer-empty';
44

55
const messages = {
66
simple: 'chore: subject',

test/rules/footer-leading-blank.js renamed to source/rules/footer-leading-blank.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import test from 'ava';
2-
import parse from '../../source/library/parse';
3-
import footerLeadingBlank from '../../source/rules/footer-leading-blank';
2+
import parse from '../library/parse';
3+
import footerLeadingBlank from './footer-leading-blank';
44

55
const messages = {
66
simple: 'chore: subject',

test/rules/footer-max-length.js renamed to source/rules/footer-max-length.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import test from 'ava';
2-
import parse from '../../source/library/parse';
3-
import footerMaxLength from '../../source/rules/footer-max-length';
2+
import parse from '../library/parse';
3+
import footerMaxLength from './footer-max-length';
44

55
const short = 'BREAKING CHANGE: a';
66
const long = 'BREAKING CHANGE: ab';

test/rules/footer-min-length.js renamed to source/rules/footer-min-length.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import test from 'ava';
2-
import parse from '../../source/library/parse';
3-
import footerMinLength from '../../source/rules/footer-min-length';
2+
import parse from '../library/parse';
3+
import footerMinLength from './footer-min-length';
44

55
const short = 'BREAKING CHANGE: a';
66
const long = 'BREAKING CHANGE: ab';

test/rules/scope-empty.js renamed to source/rules/scope-empty.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import test from 'ava';
2-
import parse from '../../source/library/parse';
3-
import scopeEmpty from '../../source/rules/scope-empty';
2+
import parse from '../library/parse';
3+
import scopeEmpty from './scope-empty';
44

55
const messages = {
66
plain: 'foo(bar): baz',

test/rules/scope-enum.js renamed to source/rules/scope-enum.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import test from 'ava';
2-
import parse from '../../source/library/parse';
3-
import scopeEnum from '../../source/rules/scope-enum';
2+
import parse from '../library/parse';
3+
import scopeEnum from './scope-enum';
44

55
const messages = {
66
plain: 'foo(bar): baz',

test/rules/subject-empty.js renamed to source/rules/subject-empty.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import test from 'ava';
2-
import parse from '../../source/library/parse';
3-
import subjectEmpty from '../../source/rules/subject-empty';
2+
import parse from '../library/parse';
3+
import subjectEmpty from './subject-empty';
44

55
const messages = {
66
empty: 'chore: \nbody',

test/rules/type-empty.js renamed to source/rules/type-empty.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import test from 'ava';
2-
import parse from '../../source/library/parse';
3-
import typeEmpty from '../../source/rules/type-empty';
2+
import parse from '../library/parse';
3+
import typeEmpty from './type-empty';
44

55
const messages = {
66
empty: '(scope):',

0 commit comments

Comments
 (0)