fix(transpile): fix usage of int and references to assert module

This commit is contained in:
Tobias Bosch
2015-02-06 17:18:49 -08:00
parent f39c6dc2c7
commit 6f59f2f5a3
4 changed files with 30 additions and 53 deletions

View File

@ -10,8 +10,7 @@
// - [assert.structure](#assert-structure)
// - [Integrating with Traceur](#integrating-with-traceur)
import {assert} from 'rtts_assert/rtts_assert';
// Note: `assert` gets automatically included by traceur!
export function main() {
@ -370,27 +369,6 @@ describe('Traceur', function() {
});
});
// 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() {