Skip to content

Commit

Permalink
Merge pull request #19 from power-assert-js/ts20
Browse files Browse the repository at this point in the history
Support TypeScript 2.0
  • Loading branch information
teppeis committed Oct 24, 2016
2 parents 3a47d72 + 0cc70b9 commit 9ed8970
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ language: node_js
node_js:
- "0.12"
- "4"
- "stable"
- "6"
sudo: false
cache:
directories:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ $ npm install -D espower-typescript

## TypeScript versions

* espower-typescript v6.x uses TypeScript v2.0
* espower-typescript v5.x uses TypeScript v1.8
* espower-typescript v4.x uses TypeScript v1.7
* espower-typescript v2.x and v3.x uses TypeScript v1.6
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "power-assert instrumentor for TypeScript",
"main": "index.js",
"scripts": {
"demo": "mocha --require './guess' test/demo.ts",
"test:outdir": "cd test/test-outdir && mocha --require ../../guess test/*_test.ts",
"test": "mocha --require './guess' test/*_test.ts && npm run test:outdir"
},
Expand All @@ -23,14 +24,14 @@
"license": "MIT",
"devDependencies": {
"expect.js": "^0.3.1",
"mocha": "^2.4.5",
"mocha": "^3.1.2",
"power-assert": "^1.2.0",
"react": "^0.14.7"
"react": "^15.3.2"
},
"dependencies": {
"espower-source": "^1.1.0",
"minimatch": "^3.0.0",
"typescript": "~1.8.2",
"typescript-simple": "^5.0.0"
"typescript": "^2.0.3",
"typescript-simple": "^6.0.0"
}
}
7 changes: 7 additions & 0 deletions test/demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,11 @@ describe('Person', () => {
it('arrow function', () => {
assert(alice.name === (() => 1));
});
// failed
it('TypeScript 2.0', () => {
function upperCase(this:string): string {
return this.toUpperCase();
}
assert(alice.name === upperCase.call('test'));
});
});

0 comments on commit 9ed8970

Please sign in to comment.