@ -15,7 +15,7 @@ import {HttpClient} from '../src/client';
|
||||
import {HttpErrorResponse, HttpEventType, HttpResponse} from '../src/response';
|
||||
import {HttpClientTestingBackend} from '../testing/src/backend';
|
||||
|
||||
export function main() {
|
||||
{
|
||||
describe('HttpClient', () => {
|
||||
let client: HttpClient = null !;
|
||||
let backend: HttpClientTestingBackend = null !;
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
import {HttpHeaders} from '../src/headers';
|
||||
|
||||
export function main() {
|
||||
{
|
||||
describe('HttpHeaders', () => {
|
||||
|
||||
describe('initialization', () => {
|
||||
|
@ -24,7 +24,7 @@ function runOnlyCallback(home: any, data: Object) {
|
||||
|
||||
const SAMPLE_REQ = new HttpRequest<never>('JSONP', '/test');
|
||||
|
||||
export function main() {
|
||||
{
|
||||
describe('JsonpClientBackend', () => {
|
||||
let home = {};
|
||||
let document: MockDocument;
|
||||
|
@ -47,7 +47,7 @@ class InterceptorB extends TestInterceptor {
|
||||
constructor() { super('B'); }
|
||||
}
|
||||
|
||||
export function main() {
|
||||
{
|
||||
describe('HttpClientModule', () => {
|
||||
let injector: Injector;
|
||||
beforeEach(() => {
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
import {HttpParams} from '../src/params';
|
||||
|
||||
export function main() {
|
||||
{
|
||||
describe('HttpUrlEncodedParams', () => {
|
||||
describe('initialization', () => {
|
||||
it('should be empty at construction', () => {
|
||||
|
@ -15,7 +15,7 @@ import {HttpRequest} from '../src/request';
|
||||
const TEST_URL = 'http://angular.io';
|
||||
const TEST_STRING = `I'm a body!`;
|
||||
|
||||
export function main() {
|
||||
{
|
||||
describe('HttpRequest', () => {
|
||||
describe('constructor', () => {
|
||||
it('initializes url', () => {
|
||||
|
@ -11,7 +11,7 @@ import {ddescribe, describe, it} from '@angular/core/testing/src/testing_interna
|
||||
import {HttpHeaders} from '../src/headers';
|
||||
import {HttpResponse} from '../src/response';
|
||||
|
||||
export function main() {
|
||||
{
|
||||
describe('HttpResponse', () => {
|
||||
describe('constructor()', () => {
|
||||
it('fully constructs responses', () => {
|
||||
|
@ -27,7 +27,7 @@ const TEST_POST = new HttpRequest('POST', '/test', 'some body', {
|
||||
|
||||
const XSSI_PREFIX = ')]}\'\n';
|
||||
|
||||
export function main() {
|
||||
{
|
||||
describe('XhrBackend', () => {
|
||||
let factory: MockXhrFactory = null !;
|
||||
let backend: HttpXhrBackend = null !;
|
||||
|
@ -19,7 +19,7 @@ class SampleTokenExtractor {
|
||||
getToken(): string|null { return this.token; }
|
||||
}
|
||||
|
||||
export function main() {
|
||||
{
|
||||
describe('HttpXsrfInterceptor', () => {
|
||||
let backend: HttpClientTestingBackend;
|
||||
const interceptor = new HttpXsrfInterceptor(new SampleTokenExtractor('test'), 'X-XSRF-TOKEN');
|
||||
|
Reference in New Issue
Block a user