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.
This commit is contained in:
@@ -99,7 +99,7 @@ export function main() {
|
||||
DOM.removeChild(headEl, baseEl);
|
||||
DOM.resetBaseElement();
|
||||
|
||||
expect(baseHref).toEqual('/base');
|
||||
expect(baseHref.endsWith('/base')).toBe(true);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
library angular2.dom.html5lib_adapter.test;
|
||||
|
||||
import 'package:guinness/guinness.dart';
|
||||
import 'package:unittest/unittest.dart' hide expect;
|
||||
import 'package:guinness2/guinness2.dart';
|
||||
import 'package:test/test.dart' hide expect;
|
||||
import 'package:angular2/src/platform/server/html_adapter.dart';
|
||||
|
||||
// A smoke-test of the adapter. It is primarily tested by the compiler.
|
||||
|
||||
@@ -263,7 +263,7 @@ export function main() {
|
||||
describe("importUri", () => {
|
||||
it("should return the importUri for a type", () => {
|
||||
expect(reflector.importUri(TestObjWith00Args)
|
||||
.endsWith('base/dist/dart/angular2/test/core/reflection/reflector_spec.dart'))
|
||||
.endsWith('test/core/reflection/reflector_spec.dart'))
|
||||
.toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user