Skip to content

Commit

Permalink
Move tests out of the source directory
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Feb 4, 2019
1 parent 6951a16 commit 2bb3656
Show file tree
Hide file tree
Showing 31 changed files with 34 additions and 30 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"email": "[email protected]",
"url": "sindresorhus.com"
},
"main": "dist/index.js",
"main": "dist/source",
"engines": {
"node": ">=6"
},
Expand Down Expand Up @@ -71,7 +71,7 @@
"webpack": "^4.29.0",
"webpack-cli": "^3.1.2"
},
"typings": "dist/index.d.ts",
"typings": "dist",
"sideEffects": false,
"ava": {
"babel": false,
Expand Down
2 changes: 1 addition & 1 deletion source/test/any.ts → test/any.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava';
import ow from '..';
import ow from '../source';
import {createAnyError} from './fixtures/create-error';

test('any', t => {
Expand Down
2 changes: 1 addition & 1 deletion source/test/array-buffer.ts → test/array-buffer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava';
import ow from '..';
import ow from '../source';

test('arrayBuffer', t => {
t.notThrows(() => {
Expand Down
2 changes: 1 addition & 1 deletion source/test/array.ts → test/array.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava';
import ow from '..';
import ow from '../source';

test('array', t => {
t.notThrows(() => {
Expand Down
2 changes: 1 addition & 1 deletion source/test/boolean.ts → test/boolean.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava';
import ow from '..';
import ow from '../source';

test('boolean', t => {
t.notThrows(() => {
Expand Down
2 changes: 1 addition & 1 deletion source/test/buffer.ts → test/buffer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava';
import ow from '..';
import ow from '../source';

test('buffer', t => {
t.notThrows(() => {
Expand Down
2 changes: 1 addition & 1 deletion source/test/data-view.ts → test/data-view.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava';
import ow from '..';
import ow from '../source';

test('dataView', t => {
t.notThrows(() => {
Expand Down
2 changes: 1 addition & 1 deletion source/test/date.ts → test/date.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava';
import ow from '..';
import ow from '../source';

test('date', t => {
t.notThrows(() => {
Expand Down
2 changes: 1 addition & 1 deletion source/test/error.ts → test/error.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava';
import ow from '..';
import ow from '../source';

class CustomError extends Error {
constructor(message: string) {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion source/test/function.ts → test/function.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava';
import ow from '..';
import ow from '../source';

test('function', t => {
t.notThrows(() => {
Expand Down
2 changes: 1 addition & 1 deletion source/test/infer-label.ts → test/infer-label.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava';
import ow from '..';
import ow from '../source';
import {createAnyError} from './fixtures/create-error';

test('infer label', t => {
Expand Down
2 changes: 1 addition & 1 deletion source/test/iterable.ts → test/iterable.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava';
import ow from '..';
import ow from '../source';

test('iterable', t => {
t.notThrows(() => {
Expand Down
2 changes: 1 addition & 1 deletion source/test/map.ts → test/map.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava';
import ow from '..';
import ow from '../source';

test('map', t => {
t.notThrows(() => {
Expand Down
2 changes: 1 addition & 1 deletion source/test/nan.ts → test/nan.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava';
import ow from '..';
import ow from '../source';

test('nan', t => {
t.notThrows(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava';
import ow from '..';
import ow from '../source';

test('nullOrUndefined', t => {
// tslint:disable-next-line no-null-keyword
Expand Down
2 changes: 1 addition & 1 deletion source/test/null.ts → test/null.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava';
import ow from '..';
import ow from '../source';

test('null', t => {
// tslint:disable-next-line no-null-keyword
Expand Down
2 changes: 1 addition & 1 deletion source/test/number.ts → test/number.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava';
import ow from '..';
import ow from '../source';

test('number', t => {
t.notThrows(() => {
Expand Down
2 changes: 1 addition & 1 deletion source/test/object.ts → test/object.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava';
import ow from '..';
import ow from '../source';

class Unicorn {} // tslint:disable-line

Expand Down
2 changes: 1 addition & 1 deletion source/test/optional.ts → test/optional.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava';
import ow from '..';
import ow from '../source';

test('optional', t => {
t.notThrows(() => {
Expand Down
2 changes: 1 addition & 1 deletion source/test/promise.ts → test/promise.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava';
import ow from '..';
import ow from '../source';

test('promise', t => {
t.notThrows(() => {
Expand Down
2 changes: 1 addition & 1 deletion source/test/regexp.ts → test/regexp.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava';
import ow from '..';
import ow from '../source';

test('regExp', t => {
t.notThrows(() => {
Expand Down
2 changes: 1 addition & 1 deletion source/test/set.ts → test/set.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava';
import ow from '..';
import ow from '../source';

test('set', t => {
t.notThrows(() => {
Expand Down
2 changes: 1 addition & 1 deletion source/test/string.ts → test/string.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava';
import ow from '..';
import ow from '../source';

test('string', t => {
const bar: any = 12;
Expand Down
2 changes: 1 addition & 1 deletion source/test/symbol.ts → test/symbol.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava';
import ow from '..';
import ow from '../source';

test('symbol', t => {
t.notThrows(() => {
Expand Down
2 changes: 1 addition & 1 deletion source/test/test.ts → test/test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava';
import ow from '..';
import ow from '../source';
import {createAnyError} from './fixtures/create-error';

test('not', t => {
Expand Down
2 changes: 1 addition & 1 deletion source/test/typed-array.ts → test/typed-array.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava';
import ow from '..';
import ow from '../source';

test('typedArray', t => {
t.notThrows(() => {
Expand Down
2 changes: 1 addition & 1 deletion source/test/undefined.ts → test/undefined.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava';
import ow from '..';
import ow from '../source';

test('undefined', t => {
const x = undefined;
Expand Down
2 changes: 1 addition & 1 deletion source/test/weak-map.ts → test/weak-map.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava';
import ow from '..';
import ow from '../source';

test('weakMap', t => {
t.notThrows(() => {
Expand Down
2 changes: 1 addition & 1 deletion source/test/weak-set.ts → test/weak-set.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava';
import ow from '..';
import ow from '../source';

const unicorn = {unicorn: '🦄'};
const rainbow = {rainbow: '🌈'};
Expand Down
4 changes: 4 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
"es2016"
]
},
"include": [
"source",
"test"
],
"typedocOptions": {
"out": "docs",
// Links to `ArrayPredicate` and others doesn't work when this is specified...
Expand Down

0 comments on commit 2bb3656

Please sign in to comment.