11import * as faker from 'faker' ;
2- import * as _ from 'lodash' ;
32import { SimpleWebRequest , SimpleWebRequestOptions , WebErrorResponse , WebRequestPriority } from '../src/SimpleWebRequest' ;
43import { DETAILED_RESPONSE } from './helpers' ;
54import * as SyncTasks from 'synctasks' ;
@@ -38,7 +37,7 @@ describe('SimpleWebRequest', () => {
3837 expect ( request . method ) . toEqual ( method ) ;
3938 expect ( request . status ) . toEqual ( statusCode ) ;
4039 expect ( onSuccess ) . toHaveBeenCalledWith ( response ) ;
41- } )
40+ } ) ;
4241
4342 it ( 'sends json POST request' , ( ) => {
4443 const sendData = {
@@ -64,7 +63,7 @@ describe('SimpleWebRequest', () => {
6463 expect ( request . method ) . toEqual ( method ) ;
6564 expect ( request . status ) . toEqual ( statusCode ) ;
6665 expect ( onSuccess ) . toHaveBeenCalledWith ( response ) ;
67- } )
66+ } ) ;
6867
6968 it ( 'allows to set request headers' , ( ) => {
7069 const headers = {
@@ -95,7 +94,7 @@ describe('SimpleWebRequest', () => {
9594 ( ) => new SimpleWebRequest < string > ( url , method , { } , ( ) => headers ) . start ( )
9695 ) . toThrowError ( `Don't set Accept with options.headers -- use it with the options.acceptType property` ) ;
9796
98- } )
97+ } ) ;
9998
10099 it ( 'forbids to set Content-Type header' , ( ) => {
101100 const headers = {
@@ -105,8 +104,8 @@ describe('SimpleWebRequest', () => {
105104 const url = faker . internet . url ( ) ;
106105 expect (
107106 ( ) => new SimpleWebRequest < string > ( url , method , { } , ( ) => headers ) . start ( )
108- ) . toThrowError ( `Don't set Content-Type with options.headers -- use it with the options.contentType property` )
109- } )
107+ ) . toThrowError ( `Don't set Content-Type with options.headers -- use it with the options.contentType property` ) ;
108+ } ) ;
110109
111110 describe ( 'blocking' , ( ) => {
112111 let maxRequests = 0 ;
@@ -163,7 +162,7 @@ describe('SimpleWebRequest', () => {
163162 const method = 'GET' ;
164163 const blockDefer = SyncTasks . Defer < void > ( ) ;
165164 const onSuccess1 = jasmine . createSpy ( 'onSuccess1' ) ;
166- new SimpleWebRequest < string > ( url , method , { } , undefined , ( ) => blockDefer . promise ( ) ) . start ( ) . then ( onSuccess1 ) ;
165+ new SimpleWebRequest < string > ( url , method , { } , undefined , ( ) => blockDefer . promise ( ) ) . start ( ) . then ( onSuccess1 ) ;
167166
168167 expect ( jasmine . Ajax . requests . count ( ) ) . toBe ( 0 ) ;
169168 blockDefer . resolve ( void 0 ) ;
0 commit comments