Переглянути джерело

move tests in another folder

Aurélien Richez 4 роки тому
батько
коміт
807e3645d2
4 змінених файлів з 7 додано та 7 видалено
  1. 2 2
      package.json
  2. 2 2
      test/filestream.test.ts
  3. 2 2
      test/streams.test.ts
  4. 1 1
      tsconfig.json

+ 2 - 2
package.json

@@ -5,8 +5,8 @@
   "lib": "index/index.js",
   "files": ["lib/*"],
   "scripts": {
-    "test": "mocha -r ts-node/register src/*.test.ts",
-    "test:watch": "mocha -r ts-node/register --watch --watch-files src/**/*.ts --reporter Min  src/*.test.ts",
+    "test": "mocha -r ts-node/register test/*.test.ts",
+    "test:watch": "mocha -r ts-node/register --watch --watch-files src/**/*.ts --reporter Min  test/*.test.ts",
     "build": "npm run clean && tsc && tsc -p tsconfig.json",
     "clean": "rimraf lib"
   },

+ 2 - 2
src/filestream.test.ts → test/filestream.test.ts

@@ -1,6 +1,6 @@
 import * as assert from 'assert'
-import { Source } from './Source'
-import * as Sink from './Sink'
+import { Source } from '../src/Source'
+import * as Sink from '../src/Sink'
 import * as fs from 'fs'
 
 describe('file stream', function () {

+ 2 - 2
src/streams.test.ts → test/streams.test.ts

@@ -1,7 +1,7 @@
 import * as assert from 'assert'
 import * as fc from 'fast-check'
-import { Source } from './Source'
-import * as Sink from './Sink'
+import { Source } from '../src/Source'
+import * as Sink from '../src/Sink'
 
 describe('Source', function () {
   this.timeout(5000)

+ 1 - 1
tsconfig.json

@@ -10,5 +10,5 @@
     "esModuleInterop": true,
     "lib": ["es6"]
   },
-  "include": ["./src/**/*"]
+  "include": ["./src/**/*", "tests/streams.test.ts"]
 }