Skip to content

Commit 9ed8970

Browse files
authored
Merge pull request #19 from power-assert-js/ts20
Support TypeScript 2.0
2 parents 3a47d72 + 0cc70b9 commit 9ed8970

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ language: node_js
22
node_js:
33
- "0.12"
44
- "4"
5-
- "stable"
5+
- "6"
66
sudo: false
77
cache:
88
directories:

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ $ npm install -D espower-typescript
1111

1212
## TypeScript versions
1313

14+
* espower-typescript v6.x uses TypeScript v2.0
1415
* espower-typescript v5.x uses TypeScript v1.8
1516
* espower-typescript v4.x uses TypeScript v1.7
1617
* espower-typescript v2.x and v3.x uses TypeScript v1.6

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"description": "power-assert instrumentor for TypeScript",
55
"main": "index.js",
66
"scripts": {
7+
"demo": "mocha --require './guess' test/demo.ts",
78
"test:outdir": "cd test/test-outdir && mocha --require ../../guess test/*_test.ts",
89
"test": "mocha --require './guess' test/*_test.ts && npm run test:outdir"
910
},
@@ -23,14 +24,14 @@
2324
"license": "MIT",
2425
"devDependencies": {
2526
"expect.js": "^0.3.1",
26-
"mocha": "^2.4.5",
27+
"mocha": "^3.1.2",
2728
"power-assert": "^1.2.0",
28-
"react": "^0.14.7"
29+
"react": "^15.3.2"
2930
},
3031
"dependencies": {
3132
"espower-source": "^1.1.0",
3233
"minimatch": "^3.0.0",
33-
"typescript": "~1.8.2",
34-
"typescript-simple": "^5.0.0"
34+
"typescript": "^2.0.3",
35+
"typescript-simple": "^6.0.0"
3536
}
3637
}

test/demo.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,11 @@ describe('Person', () => {
2929
it('arrow function', () => {
3030
assert(alice.name === (() => 1));
3131
});
32+
// failed
33+
it('TypeScript 2.0', () => {
34+
function upperCase(this:string): string {
35+
return this.toUpperCase();
36+
}
37+
assert(alice.name === upperCase.call('test'));
38+
});
3239
});

0 commit comments

Comments
 (0)