2016-04-12 12:40:37 -04:00
|
|
|
import {
|
|
|
|
AsyncTestCompleter,
|
|
|
|
beforeEach,
|
|
|
|
ddescribe,
|
|
|
|
describe,
|
|
|
|
expect,
|
|
|
|
iit,
|
|
|
|
inject,
|
|
|
|
it,
|
|
|
|
xdescribe,
|
|
|
|
xit
|
|
|
|
} from 'angular2/testing_internal';
|
2015-11-04 14:20:12 -05:00
|
|
|
|
2015-12-01 18:41:46 -05:00
|
|
|
import {assertionsEnabled, IS_DART} from 'angular2/src/facade/lang';
|
2015-11-04 14:20:12 -05:00
|
|
|
|
|
|
|
export function main() {
|
|
|
|
describe('dev mode', () => {
|
|
|
|
it('is enabled in our tests by default', () => { expect(assertionsEnabled()).toBe(true); });
|
|
|
|
});
|
2015-12-01 18:41:46 -05:00
|
|
|
|
|
|
|
if (IS_DART) {
|
|
|
|
describe('checked mode', () => {
|
|
|
|
it('is enabled in our tests', () => {
|
|
|
|
try {
|
|
|
|
var s: string = <any>42;
|
|
|
|
expect(s).toEqual(42); // without it, dart analyzer will complain that `s` is not used.
|
2016-04-12 12:40:37 -04:00
|
|
|
throw "should not be reached";
|
2015-12-01 18:41:46 -05:00
|
|
|
} catch (e) {
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
2015-11-04 14:20:12 -05:00
|
|
|
}
|