Skip to content

Commit fbe0f98

Browse files
committed
chore(test): add testing support
1 parent 3b048ce commit fbe0f98

File tree

4 files changed

+34
-6
lines changed

4 files changed

+34
-6
lines changed

index.test.ts

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { expect } from 'chai';
2+
3+
describe( `ts-helpers`, () => {
4+
5+
it( `should work`, () => {
6+
7+
expect( true ).to.equal( true );
8+
9+
} );
10+
11+
12+
} );

package.json

+11-4
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@
44
"description": "Typescript helpers for compiling typescript while specifying `--noEmitHelpers` within your `tsconfig.json`. Cross platform ( Node/Browser/WebWorker )",
55
"main": "index.js",
66
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 0",
8-
"prepublish": "tsc",
9-
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -w"
7+
"start": "tsc -w",
8+
"pretest": "tsc",
9+
"test": "mocha index.test.js",
10+
"test:live": "npm start & npm test -- -w",
11+
"prepublish": "npm run typings -- install && tsc",
12+
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -w",
13+
"typings": "typings"
1014
},
1115
"bugs": {
1216
"url": "https://github.com/ngParty/ts-helpers/issues"
@@ -24,9 +28,12 @@
2428
"author": "Martin Hochel <[email protected]>",
2529
"license": "MIT",
2630
"devDependencies": {
27-
"typescript": "1.8.10",
31+
"chai": "3.5.0",
2832
"conventional-changelog": "1.1.0",
2933
"ghooks": "1.0.1",
34+
"mocha": "2.4.5",
35+
"typescript": "1.8.10",
36+
"typings": "0.7.12",
3037
"validate-commit-msg": "2.0.0"
3138
},
3239
"config": {

tsconfig.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
"sourceMap": false
66
},
77
"exclude": [
8-
"node_modules"
9-
]
8+
"node_modules",
9+
"typings/browser",
10+
"typings/browser.d.ts"
11+
],
12+
"compileOnSave": false
1013
}

typings.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"ambientDependencies": {
3+
"chai": "registry:dt/chai#3.4.0+20160317120654",
4+
"mocha": "registry:dt/mocha#2.2.5+20160317120654"
5+
}
6+
}

0 commit comments

Comments
 (0)