@@ -73,7 +73,7 @@ describe("File upload", function () {
7373
7474 var callback = sinon . spy ( ) ;
7575
76- const scope = nock ( 'https://api .imagekit.io' )
76+ const scope = nock ( 'https://upload .imagekit.io/api ' )
7777 . post ( '/v1/files/upload' )
7878 . basicAuth ( { user : initializationParams . privateKey , pass : '' } )
7979 . reply ( 200 , function ( uri , requestBody ) {
@@ -97,7 +97,7 @@ describe("File upload", function () {
9797 file : fs . readFileSync ( path . join ( __dirname , "./data/test_image.jpg" ) )
9898 } ;
9999
100- const scope = nock ( 'https://api .imagekit.io' )
100+ const scope = nock ( 'https://upload .imagekit.io/api ' )
101101 . post ( '/v1/files/upload' )
102102 . basicAuth ( { user : initializationParams . privateKey , pass : '' } )
103103 . reply ( 200 , function ( uri , requestBody ) {
@@ -119,7 +119,7 @@ describe("File upload", function () {
119119
120120 var callback = sinon . spy ( ) ;
121121
122- const scope = nock ( 'https://api .imagekit.io' )
122+ const scope = nock ( 'https://upload .imagekit.io/api ' )
123123 . post ( '/v1/files/upload' )
124124 . basicAuth ( { user : initializationParams . privateKey , pass : '' } )
125125 . reply ( 200 , function ( uri , requestBody ) {
@@ -144,7 +144,7 @@ describe("File upload", function () {
144144
145145 var callback = sinon . spy ( ) ;
146146
147- const scope = nock ( 'https://api .imagekit.io' )
147+ const scope = nock ( 'https://upload .imagekit.io/api ' )
148148 . post ( '/v1/files/upload' )
149149 . basicAuth ( { user : initializationParams . privateKey , pass : '' } )
150150 . reply ( 200 , function ( uri , requestBody ) {
@@ -169,7 +169,7 @@ describe("File upload", function () {
169169
170170 var callback = sinon . spy ( ) ;
171171
172- const scope = nock ( 'https://api .imagekit.io' )
172+ const scope = nock ( 'https://upload .imagekit.io/api ' )
173173 . post ( '/v1/files/upload' )
174174 . basicAuth ( { user : initializationParams . privateKey , pass : '' } )
175175 . reply ( 200 , function ( uri , requestBody ) {
@@ -196,7 +196,7 @@ describe("File upload", function () {
196196
197197 var callback = sinon . spy ( ) ;
198198
199- const scope = nock ( 'https://api .imagekit.io' )
199+ const scope = nock ( 'https://upload .imagekit.io/api ' )
200200 . post ( '/v1/files/upload' )
201201 . basicAuth ( { user : initializationParams . privateKey , pass : '' } )
202202 . reply ( 200 , uploadSuccessResponseObj )
@@ -216,7 +216,7 @@ describe("File upload", function () {
216216 file : "test_file_content"
217217 } ;
218218
219- const scope = nock ( 'https://api .imagekit.io' )
219+ const scope = nock ( 'https://upload .imagekit.io/api ' )
220220 . post ( '/v1/files/upload' )
221221 . basicAuth ( { user : initializationParams . privateKey , pass : '' } )
222222 . reply ( 200 , uploadSuccessResponseObj )
@@ -234,7 +234,7 @@ describe("File upload", function () {
234234 file : "test_file_content"
235235 } ;
236236
237- const scope = nock ( 'https://api .imagekit.io' )
237+ const scope = nock ( 'https://upload .imagekit.io/api ' )
238238 . post ( '/v1/files/upload' )
239239 . basicAuth ( { user : initializationParams . privateKey , pass : '' } )
240240 . replyWithError ( "Network error occured" )
@@ -258,7 +258,7 @@ describe("File upload", function () {
258258 message : "Your account cannot be authenticated."
259259 } ;
260260
261- const scope = nock ( 'https://api .imagekit.io' )
261+ const scope = nock ( 'https://upload .imagekit.io/api ' )
262262 . post ( '/v1/files/upload' )
263263 . basicAuth ( { user : initializationParams . privateKey , pass : '' } )
264264 . reply ( 403 , error )
@@ -283,7 +283,7 @@ describe("File upload", function () {
283283 message : "Your account cannot be authenticated."
284284 } ;
285285
286- const scope = nock ( 'https://api .imagekit.io' )
286+ const scope = nock ( 'https://upload .imagekit.io/api ' )
287287 . post ( '/v1/files/upload' )
288288 . basicAuth ( { user : initializationParams . privateKey , pass : '' } )
289289 . reply ( 403 , error )
0 commit comments