@ -46,7 +46,7 @@ class MockBrowserJsonp extends BrowserJsonp {
|
||||
}
|
||||
}
|
||||
|
||||
export function main() {
|
||||
{
|
||||
describe('JSONPBackend', () => {
|
||||
let backend: JSONPBackend;
|
||||
let sampleRequest: Request;
|
||||
|
@ -17,7 +17,7 @@ import {Request} from '../../src/static_request';
|
||||
import {Response} from '../../src/static_response';
|
||||
import {MockBackend, MockConnection} from '../../testing/src/mock_backend';
|
||||
|
||||
export function main() {
|
||||
{
|
||||
describe('MockBackend', () => {
|
||||
|
||||
let backend: MockBackend;
|
||||
|
@ -84,7 +84,7 @@ class MockBrowserXHR extends BrowserXhr {
|
||||
}
|
||||
}
|
||||
|
||||
export function main() {
|
||||
{
|
||||
describe('XHRBackend', () => {
|
||||
let backend: XHRBackend;
|
||||
let sampleRequest: Request;
|
||||
|
@ -11,7 +11,7 @@ import {BaseRequestOptions, RequestOptions} from '../src/base_request_options';
|
||||
import {RequestMethod} from '../src/enums';
|
||||
import {Headers} from '../src/headers';
|
||||
|
||||
export function main() {
|
||||
{
|
||||
describe('BaseRequestOptions', () => {
|
||||
it('should create a new object when calling merge', () => {
|
||||
const options1 = new BaseRequestOptions();
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
import {Headers} from '../src/headers';
|
||||
|
||||
export function main() {
|
||||
{
|
||||
describe('Headers', () => {
|
||||
|
||||
describe('initialization', () => {
|
||||
|
@ -17,7 +17,7 @@ import {BaseRequestOptions, ConnectionBackend, Http, HttpModule, JSONPBackend, J
|
||||
import {stringToArrayBuffer} from '../src/http_utils';
|
||||
import {MockBackend, MockConnection} from '../testing/src/mock_backend';
|
||||
|
||||
export function main() {
|
||||
{
|
||||
describe('injectables', () => {
|
||||
const url = 'http://foo.bar';
|
||||
let http: Http;
|
||||
|
@ -15,7 +15,7 @@ import {Headers} from '../src/headers';
|
||||
import {stringToArrayBuffer, stringToArrayBuffer8} from '../src/http_utils';
|
||||
import {ArrayBuffer, Request} from '../src/static_request';
|
||||
|
||||
export function main() {
|
||||
{
|
||||
describe('Request', () => {
|
||||
describe('detectContentType', () => {
|
||||
it('should return ContentType.NONE', () => {
|
||||
|
@ -13,7 +13,7 @@ import {Response} from '../src/static_response';
|
||||
|
||||
|
||||
|
||||
export function main() {
|
||||
{
|
||||
describe('Response', () => {
|
||||
it('should be ok for 200 statuses', () => {
|
||||
expect(new Response(new ResponseOptions({status: 200})).ok).toEqual(true);
|
||||
|
@ -9,7 +9,7 @@
|
||||
import {describe, expect, it} from '@angular/core/testing/src/testing_internal';
|
||||
import {URLSearchParams} from '../src/url_search_params';
|
||||
|
||||
export function main() {
|
||||
{
|
||||
describe('URLSearchParams', () => {
|
||||
it('should conform to spec', () => {
|
||||
const paramsString = 'q=URLUtils.searchParams&topic=api';
|
||||
|
Reference in New Issue
Block a user