@@ -160,7 +160,7 @@ describe("getPreSignedURL", () => {
160160 retryCount : 0 ,
161161 serviceParams : {
162162 commit : "123" ,
163- branch : "owner: branch" ,
163+ branch : "any- branch-format " ,
164164 } ,
165165 } ) ;
166166
@@ -185,7 +185,7 @@ describe("getPreSignedURL", () => {
185185 gitService : "github_enterprise" ,
186186 serviceParams : {
187187 commit : "123" ,
188- branch : "owner: branch" ,
188+ branch : "any- branch-format " ,
189189 } ,
190190 } ) ;
191191
@@ -228,37 +228,6 @@ describe("getPreSignedURL", () => {
228228
229229 describe ( "unsuccessful request" , ( ) => {
230230 describe ( "no upload token present" , ( ) => {
231- describe ( "branch is in incorrect format" , ( ) => {
232- it ( "throws an error" , async ( ) => {
233- const { consoleSpy } = setup ( {
234- data : { url : "http://example.com" } ,
235- } ) ;
236-
237- let error ;
238- try {
239- await getPreSignedURL ( {
240- apiUrl : "http://localhost" ,
241- retryCount : 0 ,
242- gitService : "github" ,
243- serviceParams : {
244- commit : "123" ,
245- branch : "main" ,
246- } ,
247- } ) ;
248- } catch ( e ) {
249- error = e ;
250- }
251-
252- expect ( consoleSpy ) . toHaveBeenCalled ( ) ;
253- // for some reason, this test fails even tho it's the same values
254- // Expected: "No upload token found"
255- // Received: "No upload token found"
256- // Number of calls: 1
257- // expect(consoleSpy).toHaveBeenCalledWith("No upload token found");
258- expect ( error ) . toBeInstanceOf ( NoUploadTokenError ) ;
259- } ) ;
260- } ) ;
261-
262231 describe ( "git service is not found" , ( ) => {
263232 beforeEach ( ( ) => {
264233 td . when (
0 commit comments