angular-cn/modules/angular2/test/dev_mode_spec.ts
Alex Rickabaugh 60727c4d2b revert(format): Revert "chore(format): update to latest formatter"
This reverts commit 03627aa84d90f7f1d8d62f160997b783fdf9eaa4.
2016-04-12 09:41:01 -07:00

34 lines
732 B
TypeScript

import {
AsyncTestCompleter,
beforeEach,
ddescribe,
describe,
expect,
iit,
inject,
it,
xdescribe,
xit
} from 'angular2/testing_internal';
import {assertionsEnabled, IS_DART} from 'angular2/src/facade/lang';
export function main() {
describe('dev mode', () => {
it('is enabled in our tests by default', () => { expect(assertionsEnabled()).toBe(true); });
});
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.
throw "should not be reached";
} catch (e) {
}
});
});
}
}