chore(tests): Enable dev mode in all Angular tests.

Closes #5106
This commit is contained in:
Alex Rickabaugh 2015-11-04 11:20:12 -08:00
parent 0b11051ac1
commit aa70275b01
6 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,20 @@
import {
AsyncTestCompleter,
beforeEach,
ddescribe,
describe,
expect,
iit,
inject,
it,
xdescribe,
xit
} from 'angular2/testing_internal';
import {assertionsEnabled} from 'angular2/src/core/facade/lang';
export function main() {
describe('dev mode', () => {
it('is enabled in our tests by default', () => { expect(assertionsEnabled()).toBe(true); });
});
}

View File

@ -738,6 +738,7 @@ var NG_ALL = [
'OutputMetadata',
'OutputMetadata.bindingPropertyName',
'enableDevMode():js',
'ExpressionChangedAfterItHasBeenCheckedException',
'ExpressionChangedAfterItHasBeenCheckedException.message',
'ExpressionChangedAfterItHasBeenCheckedException.stackTrace',

View File

@ -18,6 +18,8 @@ System.config({
}
});
window.angularDevMode = true;
// Import all the specs, execute their `main()` method and kick off Karma (Jasmine).
System.import('angular2/src/core/dom/browser_adapter').then(function(browser_adapter) {
browser_adapter.BrowserDomAdapter.makeCurrent();

View File

@ -18,6 +18,7 @@
<script src="/bundle/http.js"></script>
<script src="/bundle/router.dev.js"></script>
<script>
window.angularDevMode = true;
var filename = '@@PATH/@@FILENAME';
System.import(filename).then(function(m) { m.main(); }, console.error.bind(console));
</script>

View File

@ -1,2 +1,3 @@
self.angularDevMode = true;
importScripts("es6-shim.js", "zone-microtask.js", "long-stack-trace-zone.js", "system.src.js",
"Reflect.js");

View File

@ -6,6 +6,8 @@ var path = require('path');
require('es6-shim/es6-shim.js');
require('reflect-metadata/Reflect');
global.angularDevMode = true;
var jrunner = new JasmineRunner();
// Tun on full stack traces in errors to help debugging