fix(setup): use upstream traceur with explicit patches

Also correct the transpile to ES6

Also support generics correctly

All patches are hooked in via `/tools/transpiler/index.js`
https://github.com/google/traceur-compiler/issues/1700
https://github.com/google/traceur-compiler/issues/1699
https://github.com/google/traceur-compiler/issues/1708
https://github.com/google/traceur-compiler/issues/1625
https://github.com/google/traceur-compiler/issues/1706
This commit is contained in:
Tobias Bosch
2015-02-06 13:38:52 -08:00
parent 63d8107d1c
commit f39c6dc2c7
46 changed files with 515 additions and 125 deletions

View File

@ -165,7 +165,6 @@ describe('primitive value check', function() {
});
// ## Describing more complex types
//
// Often, a simple type check using `instanceof` or `typeof` is not enough.
@ -370,11 +369,39 @@ describe('Traceur', function() {
.toThrowError('Expected to return an instance of void, got null!');
});
});
// Note: `int` is not part of JS types, but rtts_assert exposes a global
// so that it can be used as well.
describe('int', function() {
it('should pass', function() {
var x:int = 10;
});
it('should fail', function() {
expect(() => {
var x:int = 'ok';
}).toThrowError('Expected an instance of int, got "ok"!');
});
it('should fail', function() {
expect(() => {
var x:int = 12.3;
}).toThrowError('Expected an instance of int, got 12.3!');
});
});
describe('generics', function() {
it('should pass', function() {
var list:Array<string> = [];
});
// TODO(tbosch): add assertions based on generics to rtts_assert
});
});
// <center><small>
// This documentation was generated from [assert.spec.js](https://github.com/vojtajina/assert/blob/master/test/assert.spec.js) using [Docco](http://jashkenas.github.io/docco/).
// </small></center>
}