Files
Angular-Cn/modules/angular2/src/testing/testing_internal.dart
T
Julie Ralph 5a59e44765 chore(test): migrate Dart tests to package:test
Instead of running with karma and the karma-dart shim, run dart
tests directly using the new package:test runner. This migrates
away from package:unittest.

Fixes a couple tests, mostly associated with depending on absolute
URLs or editing the test providers after an injector had already
been created.

Remove karma-dart and associated files. Change gupfiles to run tests
via `pub run test` instead.
2016-03-04 02:27:44 +00:00

65 lines
1.2 KiB
Dart

library angular2.src.testing.testing_internal;
import 'testing_internal_core.dart' as core;
export 'testing_internal_core.dart'
hide
beforeEachProviders,
beforeEachBindings,
beforeEach,
it,
iit,
xit,
testSetup,
describe,
ddescribe,
xdescribe;
import 'package:angular2/platform/testing/browser.dart';
export 'test_injector.dart' show inject;
void testSetup() {
core.setDartBaseTestProviders(TEST_BROWSER_PLATFORM_PROVIDERS, TEST_BROWSER_APPLICATION_PROVIDERS);
}
void beforeEachProviders(Function fn) {
testSetup();
core.beforeEachProviders(fn);
}
@Deprecated('using beforeEachProviders instead')
void beforeEachBindings(Function fn) {
beforeEachProviders(fn);
}
void beforeEach(fn) {
testSetup();
core.beforeEach(fn);
}
void it(name, fn, [timeOut = null]) {
core.it(name, fn, timeOut);
}
void iit(name, fn, [timeOut = null]) {
core.iit(name, fn, timeOut);
}
void xit(name, fn, [timeOut = null]) {
core.xit(name, fn, timeOut);
}
void describe(name, fn) {
testSetup();
core.describe(name, fn);
}
void ddescribe(name, fn) {
testSetup();
core.ddescribe(name, fn);
}
void xdescribe(name, fn) {
testSetup();
core.xdescribe(name, fn);
}