Skip to content

Commit

Permalink
test(typescript): add TypeScript test to ensure it imports and compil…
Browse files Browse the repository at this point in the history
…es okay
  • Loading branch information
benlesh committed May 28, 2016
1 parent bc12021 commit aba5c73
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
node_modules
lib
ts-test/test.js
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"node": ">=0.10.0"
},
"scripts": {
"test": "mocha"
"test": "mocha && tsc ./ts-test/test.ts && node ./ts-test/test.js"
},
"files": [
"index.js",
Expand All @@ -29,6 +29,7 @@
],
"devDependencies": {
"chai": "^3.5.0",
"mocha": "^2.4.5"
"mocha": "^2.4.5",
"typescript": "^1.8.10"
}
}
9 changes: 9 additions & 0 deletions ts-test/test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import $$symbolObservable from '../';

console.log('***********************');
console.log('RUNNING TYPESCRIPT TEST');
console.log('***********************');

if (typeof $$symbolObservable !== 'symbol' && <any>$$symbolObservable !== '@@observable') {
throw new Error('Sorry, $symbolObservable is ' + JSON.stringify($$symbolObservable));
}

0 comments on commit aba5c73

Please sign in to comment.