Browse Source

Move tests out of the `source` directory

string-allowed-chars
Sindre Sorhus 6 years ago
parent
commit
2bb365609b
  1. 4
      package.json
  2. 2
      test/any.ts
  3. 2
      test/array-buffer.ts
  4. 2
      test/array.ts
  5. 2
      test/boolean.ts
  6. 2
      test/buffer.ts
  7. 2
      test/data-view.ts
  8. 2
      test/date.ts
  9. 2
      test/error.ts
  10. 0
      test/fixtures/create-error.ts
  11. 2
      test/function.ts
  12. 2
      test/infer-label.ts
  13. 2
      test/iterable.ts
  14. 2
      test/map.ts
  15. 2
      test/nan.ts
  16. 2
      test/null-or-undefined.ts
  17. 2
      test/null.ts
  18. 2
      test/number.ts
  19. 2
      test/object.ts
  20. 2
      test/optional.ts
  21. 2
      test/promise.ts
  22. 2
      test/regexp.ts
  23. 2
      test/set.ts
  24. 2
      test/string.ts
  25. 2
      test/symbol.ts
  26. 2
      test/test.ts
  27. 2
      test/typed-array.ts
  28. 2
      test/undefined.ts
  29. 2
      test/weak-map.ts
  30. 2
      test/weak-set.ts
  31. 4
      tsconfig.json

4
package.json

@ -9,7 +9,7 @@
"email": "sindresorhus@gmail.com", "email": "sindresorhus@gmail.com",
"url": "sindresorhus.com" "url": "sindresorhus.com"
}, },
"main": "dist/index.js", "main": "dist/source",
"engines": { "engines": {
"node": ">=6" "node": ">=6"
}, },
@ -71,7 +71,7 @@
"webpack": "^4.29.0", "webpack": "^4.29.0",
"webpack-cli": "^3.1.2" "webpack-cli": "^3.1.2"
}, },
"typings": "dist/index.d.ts", "typings": "dist",
"sideEffects": false, "sideEffects": false,
"ava": { "ava": {
"babel": false, "babel": false,

2
source/test/any.ts → test/any.ts

@ -1,5 +1,5 @@
import test from 'ava'; import test from 'ava';
import ow from '..'; import ow from '../source';
import {createAnyError} from './fixtures/create-error'; import {createAnyError} from './fixtures/create-error';
test('any', t => { test('any', t => {

2
source/test/array-buffer.ts → test/array-buffer.ts

@ -1,5 +1,5 @@
import test from 'ava'; import test from 'ava';
import ow from '..'; import ow from '../source';
test('arrayBuffer', t => { test('arrayBuffer', t => {
t.notThrows(() => { t.notThrows(() => {

2
source/test/array.ts → test/array.ts

@ -1,5 +1,5 @@
import test from 'ava'; import test from 'ava';
import ow from '..'; import ow from '../source';
test('array', t => { test('array', t => {
t.notThrows(() => { t.notThrows(() => {

2
source/test/boolean.ts → test/boolean.ts

@ -1,5 +1,5 @@
import test from 'ava'; import test from 'ava';
import ow from '..'; import ow from '../source';
test('boolean', t => { test('boolean', t => {
t.notThrows(() => { t.notThrows(() => {

2
source/test/buffer.ts → test/buffer.ts

@ -1,5 +1,5 @@
import test from 'ava'; import test from 'ava';
import ow from '..'; import ow from '../source';
test('buffer', t => { test('buffer', t => {
t.notThrows(() => { t.notThrows(() => {

2
source/test/data-view.ts → test/data-view.ts

@ -1,5 +1,5 @@
import test from 'ava'; import test from 'ava';
import ow from '..'; import ow from '../source';
test('dataView', t => { test('dataView', t => {
t.notThrows(() => { t.notThrows(() => {

2
source/test/date.ts → test/date.ts

@ -1,5 +1,5 @@
import test from 'ava'; import test from 'ava';
import ow from '..'; import ow from '../source';
test('date', t => { test('date', t => {
t.notThrows(() => { t.notThrows(() => {

2
source/test/error.ts → test/error.ts

@ -1,5 +1,5 @@
import test from 'ava'; import test from 'ava';
import ow from '..'; import ow from '../source';
class CustomError extends Error { class CustomError extends Error {
constructor(message: string) { constructor(message: string) {

0
source/test/fixtures/create-error.ts → test/fixtures/create-error.ts

2
source/test/function.ts → test/function.ts

@ -1,5 +1,5 @@
import test from 'ava'; import test from 'ava';
import ow from '..'; import ow from '../source';
test('function', t => { test('function', t => {
t.notThrows(() => { t.notThrows(() => {

2
source/test/infer-label.ts → test/infer-label.ts

@ -1,5 +1,5 @@
import test from 'ava'; import test from 'ava';
import ow from '..'; import ow from '../source';
import {createAnyError} from './fixtures/create-error'; import {createAnyError} from './fixtures/create-error';
test('infer label', t => { test('infer label', t => {

2
source/test/iterable.ts → test/iterable.ts

@ -1,5 +1,5 @@
import test from 'ava'; import test from 'ava';
import ow from '..'; import ow from '../source';
test('iterable', t => { test('iterable', t => {
t.notThrows(() => { t.notThrows(() => {

2
source/test/map.ts → test/map.ts

@ -1,5 +1,5 @@
import test from 'ava'; import test from 'ava';
import ow from '..'; import ow from '../source';
test('map', t => { test('map', t => {
t.notThrows(() => { t.notThrows(() => {

2
source/test/nan.ts → test/nan.ts

@ -1,5 +1,5 @@
import test from 'ava'; import test from 'ava';
import ow from '..'; import ow from '../source';
test('nan', t => { test('nan', t => {
t.notThrows(() => { t.notThrows(() => {

2
source/test/null-or-undefined.ts → test/null-or-undefined.ts

@ -1,5 +1,5 @@
import test from 'ava'; import test from 'ava';
import ow from '..'; import ow from '../source';
test('nullOrUndefined', t => { test('nullOrUndefined', t => {
// tslint:disable-next-line no-null-keyword // tslint:disable-next-line no-null-keyword

2
source/test/null.ts → test/null.ts

@ -1,5 +1,5 @@
import test from 'ava'; import test from 'ava';
import ow from '..'; import ow from '../source';
test('null', t => { test('null', t => {
// tslint:disable-next-line no-null-keyword // tslint:disable-next-line no-null-keyword

2
source/test/number.ts → test/number.ts

@ -1,5 +1,5 @@
import test from 'ava'; import test from 'ava';
import ow from '..'; import ow from '../source';
test('number', t => { test('number', t => {
t.notThrows(() => { t.notThrows(() => {

2
source/test/object.ts → test/object.ts

@ -1,5 +1,5 @@
import test from 'ava'; import test from 'ava';
import ow from '..'; import ow from '../source';
class Unicorn {} // tslint:disable-line class Unicorn {} // tslint:disable-line

2
source/test/optional.ts → test/optional.ts

@ -1,5 +1,5 @@
import test from 'ava'; import test from 'ava';
import ow from '..'; import ow from '../source';
test('optional', t => { test('optional', t => {
t.notThrows(() => { t.notThrows(() => {

2
source/test/promise.ts → test/promise.ts

@ -1,5 +1,5 @@
import test from 'ava'; import test from 'ava';
import ow from '..'; import ow from '../source';
test('promise', t => { test('promise', t => {
t.notThrows(() => { t.notThrows(() => {

2
source/test/regexp.ts → test/regexp.ts

@ -1,5 +1,5 @@
import test from 'ava'; import test from 'ava';
import ow from '..'; import ow from '../source';
test('regExp', t => { test('regExp', t => {
t.notThrows(() => { t.notThrows(() => {

2
source/test/set.ts → test/set.ts

@ -1,5 +1,5 @@
import test from 'ava'; import test from 'ava';
import ow from '..'; import ow from '../source';
test('set', t => { test('set', t => {
t.notThrows(() => { t.notThrows(() => {

2
source/test/string.ts → test/string.ts

@ -1,5 +1,5 @@
import test from 'ava'; import test from 'ava';
import ow from '..'; import ow from '../source';
test('string', t => { test('string', t => {
const bar: any = 12; const bar: any = 12;

2
source/test/symbol.ts → test/symbol.ts

@ -1,5 +1,5 @@
import test from 'ava'; import test from 'ava';
import ow from '..'; import ow from '../source';
test('symbol', t => { test('symbol', t => {
t.notThrows(() => { t.notThrows(() => {

2
source/test/test.ts → test/test.ts

@ -1,5 +1,5 @@
import test from 'ava'; import test from 'ava';
import ow from '..'; import ow from '../source';
import {createAnyError} from './fixtures/create-error'; import {createAnyError} from './fixtures/create-error';
test('not', t => { test('not', t => {

2
source/test/typed-array.ts → test/typed-array.ts

@ -1,5 +1,5 @@
import test from 'ava'; import test from 'ava';
import ow from '..'; import ow from '../source';
test('typedArray', t => { test('typedArray', t => {
t.notThrows(() => { t.notThrows(() => {

2
source/test/undefined.ts → test/undefined.ts

@ -1,5 +1,5 @@
import test from 'ava'; import test from 'ava';
import ow from '..'; import ow from '../source';
test('undefined', t => { test('undefined', t => {
const x = undefined; const x = undefined;

2
source/test/weak-map.ts → test/weak-map.ts

@ -1,5 +1,5 @@
import test from 'ava'; import test from 'ava';
import ow from '..'; import ow from '../source';
test('weakMap', t => { test('weakMap', t => {
t.notThrows(() => { t.notThrows(() => {

2
source/test/weak-set.ts → test/weak-set.ts

@ -1,5 +1,5 @@
import test from 'ava'; import test from 'ava';
import ow from '..'; import ow from '../source';
const unicorn = {unicorn: '🦄'}; const unicorn = {unicorn: '🦄'};
const rainbow = {rainbow: '🌈'}; const rainbow = {rainbow: '🌈'};

4
tsconfig.json

@ -7,6 +7,10 @@
"es2016" "es2016"
] ]
}, },
"include": [
"source",
"test"
],
"typedocOptions": { "typedocOptions": {
"out": "docs", "out": "docs",
// Links to `ArrayPredicate` and others doesn't work when this is specified... // Links to `ArrayPredicate` and others doesn't work when this is specified...

Loading…
Cancel
Save