22 updateURLs ,
33 shouldOrPromptUpdateURLs ,
44 generateFrontendURL ,
5- generatePartnersURLs ,
6- PartnersURLs ,
7- validatePartnersURLs ,
5+ generateApplicationURLs ,
6+ ApplicationURLs ,
7+ validateApplicationURLs ,
88 FrontendURLOptions ,
99} from './urls.js'
1010import {
@@ -557,7 +557,7 @@ describe('generatePartnersURLs', () => {
557557 test ( 'Returns the default values without an override' , ( ) => {
558558 const applicationUrl = 'http://my-base-url'
559559
560- const got = generatePartnersURLs ( applicationUrl )
560+ const got = generateApplicationURLs ( applicationUrl )
561561
562562 expect ( got ) . toMatchObject ( {
563563 applicationUrl,
@@ -573,7 +573,7 @@ describe('generatePartnersURLs', () => {
573573 const applicationUrl = 'http://my-base-url'
574574 const overridePath = '/my/custom/path'
575575
576- const got = generatePartnersURLs ( applicationUrl , overridePath )
576+ const got = generateApplicationURLs ( applicationUrl , overridePath )
577577
578578 expect ( got ) . toMatchObject ( {
579579 applicationUrl,
@@ -585,7 +585,7 @@ describe('generatePartnersURLs', () => {
585585 const applicationUrl = 'http://my-base-url'
586586 const overridePath = [ '/my/custom/path1' , '/my/custom/path2' ]
587587
588- const got = generatePartnersURLs ( applicationUrl , overridePath )
588+ const got = generateApplicationURLs ( applicationUrl , overridePath )
589589
590590 expect ( got ) . toMatchObject ( {
591591 applicationUrl,
@@ -596,7 +596,7 @@ describe('generatePartnersURLs', () => {
596596 test ( 'Returns app proxy section when receiving proxy fields' , ( ) => {
597597 const applicationUrl = 'http://my-base-url'
598598
599- const got = generatePartnersURLs ( applicationUrl , [ ] , {
599+ const got = generateApplicationURLs ( applicationUrl , [ ] , {
600600 url : applicationUrl ,
601601 subpath : 'subpath' ,
602602 prefix : 'prefix' ,
@@ -621,7 +621,7 @@ describe('generatePartnersURLs', () => {
621621 const applicationUrl = 'http://my-base-url'
622622 const proxyUrl = 'http://old-base-url/subpath'
623623
624- const got = generatePartnersURLs ( applicationUrl , [ ] , {
624+ const got = generateApplicationURLs ( applicationUrl , [ ] , {
625625 url : proxyUrl ,
626626 subpath : 'subpath' ,
627627 prefix : 'prefix' ,
@@ -648,47 +648,47 @@ describe('validatePartnersURLs', () => {
648648 // Given
649649 const applicationUrl = 'http://example.com'
650650 const redirectUrlWhitelist = [ 'http://example.com/callback1' , 'http://example.com/callback2' ]
651- const urls : PartnersURLs = {
651+ const urls : ApplicationURLs = {
652652 applicationUrl,
653653 redirectUrlWhitelist,
654654 appProxy : { proxyUrl : applicationUrl , proxySubPath : '' , proxySubPathPrefix : '' } ,
655655 }
656656
657657 // When/Then
658- validatePartnersURLs ( urls )
658+ validateApplicationURLs ( urls )
659659 } )
660660
661661 test ( 'it raises an error when the application URL is not valid' , ( ) => {
662662 // Given
663663 const applicationUrl = 'wrong'
664664 const redirectUrlWhitelist = [ 'http://example.com/callback1' , 'http://example.com/callback2' ]
665- const urls : PartnersURLs = { applicationUrl, redirectUrlWhitelist}
665+ const urls : ApplicationURLs = { applicationUrl, redirectUrlWhitelist}
666666
667667 // When/Then
668- expect ( ( ) => validatePartnersURLs ( urls ) ) . toThrow ( / I n v a l i d a p p l i c a t i o n U R L / )
668+ expect ( ( ) => validateApplicationURLs ( urls ) ) . toThrow ( / I n v a l i d a p p l i c a t i o n U R L / )
669669 } )
670670
671671 test ( 'it raises an error when the redirection URLs are not valid' , ( ) => {
672672 // Given
673673 const applicationUrl = 'http://example.com'
674674 const redirectUrlWhitelist = [ 'http://example.com/callback1' , 'wrong' ]
675- const urls : PartnersURLs = { applicationUrl, redirectUrlWhitelist}
675+ const urls : ApplicationURLs = { applicationUrl, redirectUrlWhitelist}
676676
677677 // When/Then
678- expect ( ( ) => validatePartnersURLs ( urls ) ) . toThrow ( / I n v a l i d r e d i r e c t i o n U R L s / )
678+ expect ( ( ) => validateApplicationURLs ( urls ) ) . toThrow ( / I n v a l i d r e d i r e c t i o n U R L s / )
679679 } )
680680
681681 test ( 'it raises an error when the app proxy URL is not valid' , ( ) => {
682682 // Given
683683 const applicationUrl = 'http://example.com'
684684 const redirectUrlWhitelist = [ 'http://example.com/callback1' , 'http://example.com/callback2' ]
685- const urls : PartnersURLs = {
685+ const urls : ApplicationURLs = {
686686 applicationUrl,
687687 redirectUrlWhitelist,
688688 appProxy : { proxyUrl : 'wrong' , proxySubPath : '' , proxySubPathPrefix : '' } ,
689689 }
690690
691691 // When/Then
692- expect ( ( ) => validatePartnersURLs ( urls ) ) . toThrow ( / I n v a l i d a p p p r o x y U R L / )
692+ expect ( ( ) => validateApplicationURLs ( urls ) ) . toThrow ( / I n v a l i d a p p p r o x y U R L / )
693693 } )
694694} )
0 commit comments