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:
@ -12,12 +12,21 @@ import {
|
||||
|
||||
import {XHRImpl} from 'angular2/src/platform/browser/xhr_impl';
|
||||
import {PromiseWrapper} from 'angular2/src/facade/async';
|
||||
import {IS_DART} from 'angular2/src/facade/lang';
|
||||
|
||||
export function main() {
|
||||
describe('XHRImpl', () => {
|
||||
var xhr: XHRImpl;
|
||||
var url200 = '/base/modules/angular2/test/platform/browser/static_assets/200.html';
|
||||
var url404 = '/base/modules/angular2/test/platform/browser/static_assets/404.html';
|
||||
|
||||
// TODO(juliemr): This file currently won't work with dart unit tests run using
|
||||
// exclusive it or describe (iit or ddescribe). This is because when
|
||||
// pub run test is executed against this specific file the relative paths
|
||||
// will be relative to here, so url200 should look like
|
||||
// static_assets/200.html.
|
||||
// We currently have no way of detecting this.
|
||||
var urlBase = IS_DART ? '' : '/base/modules/angular2/';
|
||||
var url200 = urlBase + 'test/platform/browser/static_assets/200.html';
|
||||
var url404 = '/bad/path/404.html';
|
||||
|
||||
beforeEach(() => { xhr = new XHRImpl(); });
|
||||
|
||||
|
Reference in New Issue
Block a user