test(ivy): fix paths for http tests to work with ivy (#27121)
PR Close #27121
This commit is contained in:
parent
e22a302cad
commit
3ec7c5081d
|
@ -19,9 +19,6 @@ ts_library(
|
|||
jasmine_node_test(
|
||||
name = "test",
|
||||
bootstrap = ["angular/tools/testing/init_node_spec.js"],
|
||||
tags = [
|
||||
"fixme-ivy-aot",
|
||||
],
|
||||
deps = [
|
||||
":test_lib",
|
||||
"//tools/testing:node",
|
||||
|
@ -30,9 +27,6 @@ jasmine_node_test(
|
|||
|
||||
ts_web_test_suite(
|
||||
name = "test_web",
|
||||
tags = [
|
||||
"fixme-ivy-aot",
|
||||
],
|
||||
deps = [
|
||||
":test_lib",
|
||||
],
|
||||
|
|
|
@ -6,13 +6,12 @@
|
|||
* 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 {toArray} from 'rxjs/operators';
|
||||
|
||||
import {HttpClient} from '../src/client';
|
||||
import {HttpErrorResponse, HttpEventType, HttpResponse} from '../src/response';
|
||||
import {HttpClientTestingBackend} from '../testing/src/backend';
|
||||
|
||||
{
|
||||
describe('HttpClient', () => {
|
||||
let client: HttpClient = null !;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* 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', () => {
|
||||
|
|
|
@ -6,13 +6,12 @@
|
|||
* 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 {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';
|
||||
|
||||
function runOnlyCallback(home: any, data: Object) {
|
||||
|
|
|
@ -6,20 +6,19 @@
|
|||
* 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 {TestBed} from '@angular/core/testing';
|
||||
import {Observable} from 'rxjs';
|
||||
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 {
|
||||
constructor(private value: string) {}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* 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', () => {
|
||||
|
|
|
@ -6,12 +6,11 @@
|
|||
* 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 {HttpHeaders} from '../src/headers';
|
||||
import {HttpParams} from '../src/params';
|
||||
import {HttpRequest} from '../src/request';
|
||||
|
||||
const TEST_URL = 'http://angular.io';
|
||||
const TEST_STRING = `I'm a body!`;
|
||||
|
||||
|
|
|
@ -6,11 +6,10 @@
|
|||
* 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 {HttpHeaders} from '../src/headers';
|
||||
import {HttpResponse} from '../src/response';
|
||||
|
||||
{
|
||||
describe('HttpResponse', () => {
|
||||
describe('constructor()', () => {
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {HttpHeaders} from '../src/headers';
|
||||
import {XhrFactory} from '../src/xhr';
|
||||
import {HttpHeaders} from '@angular/common/http/src/headers';
|
||||
import {XhrFactory} from '@angular/common/http/src/xhr';
|
||||
|
||||
export class MockXhrFactory implements XhrFactory {
|
||||
// TODO(issue/24571): remove '!'.
|
||||
|
|
|
@ -6,14 +6,13 @@
|
|||
* 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 {Observable} from 'rxjs';
|
||||
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';
|
||||
|
||||
function trackEvents(obs: Observable<HttpEvent<any>>): HttpEvent<any>[] {
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {HttpHeaders} from '../src/headers';
|
||||
import {HttpRequest} from '../src/request';
|
||||
import {HttpXsrfCookieExtractor, HttpXsrfInterceptor, HttpXsrfTokenExtractor} from '../src/xsrf';
|
||||
import {HttpHeaders} from '@angular/common/http/src/headers';
|
||||
import {HttpRequest} from '@angular/common/http/src/request';
|
||||
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 {
|
||||
constructor(private token: string|null) { super(); }
|
||||
|
|
|
@ -18,7 +18,6 @@ ts_library(
|
|||
jasmine_node_test(
|
||||
name = "test",
|
||||
bootstrap = ["angular/tools/testing/init_node_spec.js"],
|
||||
tags = ["fixme-ivy-aot"],
|
||||
deps = [
|
||||
":test_lib",
|
||||
"//tools/testing:node",
|
||||
|
@ -27,7 +26,6 @@ jasmine_node_test(
|
|||
|
||||
ts_web_test_suite(
|
||||
name = "test_web",
|
||||
tags = ["fixme-ivy-aot"],
|
||||
deps = [
|
||||
":test_lib",
|
||||
"@ngdeps//karma",
|
||||
|
|
|
@ -10,11 +10,11 @@ import {Injector} from '@angular/core';
|
|||
import {TestBed, getTestBed} from '@angular/core/testing';
|
||||
import {AsyncTestCompleter, afterEach, beforeEach, describe, inject, it} from '@angular/core/testing/src/testing_internal';
|
||||
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 {Observable, zip} from 'rxjs';
|
||||
|
||||
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', () => {
|
||||
|
|
Loading…
Reference in New Issue