test(ivy): fix paths for http tests to work with ivy (#27121)

PR Close #27121
This commit is contained in:
Kara Erickson 2018-11-15 11:35:08 -08:00 committed by Misko Hevery
parent e22a302cad
commit 3ec7c5081d
13 changed files with 35 additions and 49 deletions

View File

@ -19,9 +19,6 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
bootstrap = ["angular/tools/testing/init_node_spec.js"], bootstrap = ["angular/tools/testing/init_node_spec.js"],
tags = [
"fixme-ivy-aot",
],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node", "//tools/testing:node",
@ -30,9 +27,6 @@ jasmine_node_test(
ts_web_test_suite( ts_web_test_suite(
name = "test_web", name = "test_web",
tags = [
"fixme-ivy-aot",
],
deps = [ deps = [
":test_lib", ":test_lib",
], ],

View File

@ -6,13 +6,12 @@
* found in the LICENSE file at https://angular.io/license * found in the LICENSE file at https://angular.io/license
*/ */
import {HttpClient} from '@angular/common/http/src/client';
import {HttpErrorResponse, HttpEventType, HttpResponse} from '@angular/common/http/src/response';
import {HttpClientTestingBackend} from '@angular/common/http/testing/src/backend';
import {ddescribe, describe, fit, it} from '@angular/core/testing/src/testing_internal'; import {ddescribe, describe, fit, it} from '@angular/core/testing/src/testing_internal';
import {toArray} from 'rxjs/operators'; import {toArray} from 'rxjs/operators';
import {HttpClient} from '../src/client';
import {HttpErrorResponse, HttpEventType, HttpResponse} from '../src/response';
import {HttpClientTestingBackend} from '../testing/src/backend';
{ {
describe('HttpClient', () => { describe('HttpClient', () => {
let client: HttpClient = null !; let client: HttpClient = null !;

View File

@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license * found in the LICENSE file at https://angular.io/license
*/ */
import {HttpHeaders} from '../src/headers'; import {HttpHeaders} from '@angular/common/http/src/headers';
{ {
describe('HttpHeaders', () => { describe('HttpHeaders', () => {

View File

@ -6,13 +6,12 @@
* found in the LICENSE file at https://angular.io/license * found in the LICENSE file at https://angular.io/license
*/ */
import {JSONP_ERR_NO_CALLBACK, JSONP_ERR_WRONG_METHOD, JSONP_ERR_WRONG_RESPONSE_TYPE, JsonpClientBackend} from '@angular/common/http/src/jsonp';
import {HttpRequest} from '@angular/common/http/src/request';
import {HttpErrorResponse, HttpEventType} from '@angular/common/http/src/response';
import {ddescribe, describe, it} from '@angular/core/testing/src/testing_internal'; import {ddescribe, describe, it} from '@angular/core/testing/src/testing_internal';
import {toArray} from 'rxjs/operators'; import {toArray} from 'rxjs/operators';
import {JSONP_ERR_NO_CALLBACK, JSONP_ERR_WRONG_METHOD, JSONP_ERR_WRONG_RESPONSE_TYPE, JsonpClientBackend} from '../src/jsonp';
import {HttpRequest} from '../src/request';
import {HttpErrorResponse, HttpEventType} from '../src/response';
import {MockDocument} from './jsonp_mock'; import {MockDocument} from './jsonp_mock';
function runOnlyCallback(home: any, data: Object) { function runOnlyCallback(home: any, data: Object) {

View File

@ -6,20 +6,19 @@
* found in the LICENSE file at https://angular.io/license * found in the LICENSE file at https://angular.io/license
*/ */
import {HttpHandler} from '@angular/common/http/src/backend';
import {HttpClient} from '@angular/common/http/src/client';
import {HTTP_INTERCEPTORS, HttpInterceptor} from '@angular/common/http/src/interceptor';
import {HttpRequest} from '@angular/common/http/src/request';
import {HttpEvent, HttpResponse} from '@angular/common/http/src/response';
import {HttpTestingController} from '@angular/common/http/testing/src/api';
import {HttpClientTestingModule} from '@angular/common/http/testing/src/module';
import {TestRequest} from '@angular/common/http/testing/src/request';
import {Injectable, Injector} from '@angular/core'; import {Injectable, Injector} from '@angular/core';
import {TestBed} from '@angular/core/testing'; import {TestBed} from '@angular/core/testing';
import {Observable} from 'rxjs'; import {Observable} from 'rxjs';
import {map} from 'rxjs/operators'; import {map} from 'rxjs/operators';
import {HttpHandler} from '../src/backend';
import {HttpClient} from '../src/client';
import {HTTP_INTERCEPTORS, HttpInterceptor} from '../src/interceptor';
import {HttpRequest} from '../src/request';
import {HttpEvent, HttpResponse} from '../src/response';
import {HttpTestingController} from '../testing/src/api';
import {HttpClientTestingModule} from '../testing/src/module';
import {TestRequest} from '../testing/src/request';
class TestInterceptor implements HttpInterceptor { class TestInterceptor implements HttpInterceptor {
constructor(private value: string) {} constructor(private value: string) {}

View File

@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license * found in the LICENSE file at https://angular.io/license
*/ */
import {HttpParams} from '../src/params'; import {HttpParams} from '@angular/common/http/src/params';
{ {
describe('HttpUrlEncodedParams', () => { describe('HttpUrlEncodedParams', () => {

View File

@ -6,12 +6,11 @@
* found in the LICENSE file at https://angular.io/license * found in the LICENSE file at https://angular.io/license
*/ */
import {HttpHeaders} from '@angular/common/http/src/headers';
import {HttpParams} from '@angular/common/http/src/params';
import {HttpRequest} from '@angular/common/http/src/request';
import {ddescribe, describe, it} from '@angular/core/testing/src/testing_internal'; import {ddescribe, describe, it} from '@angular/core/testing/src/testing_internal';
import {HttpHeaders} from '../src/headers';
import {HttpParams} from '../src/params';
import {HttpRequest} from '../src/request';
const TEST_URL = 'http://angular.io'; const TEST_URL = 'http://angular.io';
const TEST_STRING = `I'm a body!`; const TEST_STRING = `I'm a body!`;
@ -161,4 +160,4 @@ const TEST_STRING = `I'm a body!`;
}); });
}); });
}); });
} }

View File

@ -6,11 +6,10 @@
* found in the LICENSE file at https://angular.io/license * found in the LICENSE file at https://angular.io/license
*/ */
import {HttpHeaders} from '@angular/common/http/src/headers';
import {HttpResponse} from '@angular/common/http/src/response';
import {ddescribe, describe, it} from '@angular/core/testing/src/testing_internal'; import {ddescribe, describe, it} from '@angular/core/testing/src/testing_internal';
import {HttpHeaders} from '../src/headers';
import {HttpResponse} from '../src/response';
{ {
describe('HttpResponse', () => { describe('HttpResponse', () => {
describe('constructor()', () => { describe('constructor()', () => {
@ -79,4 +78,4 @@ import {HttpResponse} from '../src/response';
}); });
}); });
}); });
} }

View File

@ -6,8 +6,8 @@
* found in the LICENSE file at https://angular.io/license * found in the LICENSE file at https://angular.io/license
*/ */
import {HttpHeaders} from '../src/headers'; import {HttpHeaders} from '@angular/common/http/src/headers';
import {XhrFactory} from '../src/xhr'; import {XhrFactory} from '@angular/common/http/src/xhr';
export class MockXhrFactory implements XhrFactory { export class MockXhrFactory implements XhrFactory {
// TODO(issue/24571): remove '!'. // TODO(issue/24571): remove '!'.
@ -119,4 +119,4 @@ export class MockXMLHttpRequest {
} }
abort() { this.mockAborted = true; } abort() { this.mockAborted = true; }
} }

View File

@ -6,14 +6,13 @@
* found in the LICENSE file at https://angular.io/license * found in the LICENSE file at https://angular.io/license
*/ */
import {HttpRequest} from '@angular/common/http/src/request';
import {HttpDownloadProgressEvent, HttpErrorResponse, HttpEvent, HttpEventType, HttpHeaderResponse, HttpResponse, HttpResponseBase, HttpUploadProgressEvent} from '@angular/common/http/src/response';
import {HttpXhrBackend} from '@angular/common/http/src/xhr';
import {ddescribe, describe, fit, it} from '@angular/core/testing/src/testing_internal'; import {ddescribe, describe, fit, it} from '@angular/core/testing/src/testing_internal';
import {Observable} from 'rxjs'; import {Observable} from 'rxjs';
import {toArray} from 'rxjs/operators'; import {toArray} from 'rxjs/operators';
import {HttpRequest} from '../src/request';
import {HttpDownloadProgressEvent, HttpErrorResponse, HttpEvent, HttpEventType, HttpHeaderResponse, HttpResponse, HttpResponseBase, HttpUploadProgressEvent} from '../src/response';
import {HttpXhrBackend} from '../src/xhr';
import {MockXhrFactory} from './xhr_mock'; import {MockXhrFactory} from './xhr_mock';
function trackEvents(obs: Observable<HttpEvent<any>>): HttpEvent<any>[] { function trackEvents(obs: Observable<HttpEvent<any>>): HttpEvent<any>[] {

View File

@ -6,11 +6,11 @@
* found in the LICENSE file at https://angular.io/license * found in the LICENSE file at https://angular.io/license
*/ */
import {HttpHeaders} from '../src/headers'; import {HttpHeaders} from '@angular/common/http/src/headers';
import {HttpRequest} from '../src/request'; import {HttpRequest} from '@angular/common/http/src/request';
import {HttpXsrfCookieExtractor, HttpXsrfInterceptor, HttpXsrfTokenExtractor} from '../src/xsrf'; import {HttpXsrfCookieExtractor, HttpXsrfInterceptor, HttpXsrfTokenExtractor} from '@angular/common/http/src/xsrf';
import {HttpClientTestingBackend} from '../testing/src/backend'; import {HttpClientTestingBackend} from '@angular/common/http/testing/src/backend';
class SampleTokenExtractor extends HttpXsrfTokenExtractor { class SampleTokenExtractor extends HttpXsrfTokenExtractor {
constructor(private token: string|null) { super(); } constructor(private token: string|null) { super(); }
@ -88,4 +88,4 @@ class SampleTokenExtractor extends HttpXsrfTokenExtractor {
function getParseCount(extractor: HttpXsrfCookieExtractor): number { function getParseCount(extractor: HttpXsrfCookieExtractor): number {
return (extractor as any).parseCount; return (extractor as any).parseCount;
} }

View File

@ -18,7 +18,6 @@ ts_library(
jasmine_node_test( jasmine_node_test(
name = "test", name = "test",
bootstrap = ["angular/tools/testing/init_node_spec.js"], bootstrap = ["angular/tools/testing/init_node_spec.js"],
tags = ["fixme-ivy-aot"],
deps = [ deps = [
":test_lib", ":test_lib",
"//tools/testing:node", "//tools/testing:node",
@ -27,7 +26,6 @@ jasmine_node_test(
ts_web_test_suite( ts_web_test_suite(
name = "test_web", name = "test_web",
tags = ["fixme-ivy-aot"],
deps = [ deps = [
":test_lib", ":test_lib",
"@ngdeps//karma", "@ngdeps//karma",

View File

@ -10,11 +10,11 @@ import {Injector} from '@angular/core';
import {TestBed, getTestBed} from '@angular/core/testing'; import {TestBed, getTestBed} from '@angular/core/testing';
import {AsyncTestCompleter, afterEach, beforeEach, describe, inject, it} from '@angular/core/testing/src/testing_internal'; import {AsyncTestCompleter, afterEach, beforeEach, describe, inject, it} from '@angular/core/testing/src/testing_internal';
import {stringToArrayBuffer} from '@angular/http/src/http_utils'; import {stringToArrayBuffer} from '@angular/http/src/http_utils';
import {MockBackend, MockConnection} from '@angular/http/testing/src/mock_backend';
import {expect} from '@angular/platform-browser/testing/src/matchers'; import {expect} from '@angular/platform-browser/testing/src/matchers';
import {Observable, zip} from 'rxjs'; import {Observable, zip} from 'rxjs';
import {BaseRequestOptions, ConnectionBackend, Http, HttpModule, JSONPBackend, Jsonp, JsonpModule, Request, RequestMethod, RequestOptions, Response, ResponseContentType, ResponseOptions, URLSearchParams, XHRBackend} from '../index'; import {BaseRequestOptions, ConnectionBackend, Http, HttpModule, JSONPBackend, Jsonp, JsonpModule, Request, RequestMethod, RequestOptions, Response, ResponseContentType, ResponseOptions, URLSearchParams, XHRBackend} from '../index';
import {MockBackend, MockConnection} from '../testing/src/mock_backend';
{ {
describe('injectables', () => { describe('injectables', () => {