@@ -74,42 +74,6 @@ describe("util", () => {
74
74
} )
75
75
} )
76
76
77
- describe ( "resolveBase" , ( ) => {
78
- beforeEach ( ( ) => {
79
- const location : LocationLike = {
80
- pathname : "/healthz" ,
81
- origin : "http://localhost:8080" ,
82
- }
83
-
84
- // Because resolveBase is not a pure function
85
- // and relies on the global location to be set
86
- // we set it before all the tests
87
- // and tell TS that our location should be looked at
88
- // as Location (even though it's missing some properties)
89
- global . location = location as Location
90
- } )
91
-
92
- it ( "should resolve a base" , ( ) => {
93
- expect ( util . resolveBase ( "localhost:8080" ) ) . toBe ( "/localhost:8080" )
94
- } )
95
-
96
- it ( "should resolve a base with a forward slash at the beginning" , ( ) => {
97
- expect ( util . resolveBase ( "/localhost:8080" ) ) . toBe ( "/localhost:8080" )
98
- } )
99
-
100
- it ( "should resolve a base with query params" , ( ) => {
101
- expect ( util . resolveBase ( "localhost:8080?folder=hello-world" ) ) . toBe ( "/localhost:8080" )
102
- } )
103
-
104
- it ( "should resolve a base with a path" , ( ) => {
105
- expect ( util . resolveBase ( "localhost:8080/hello/world" ) ) . toBe ( "/localhost:8080/hello/world" )
106
- } )
107
-
108
- it ( "should resolve a base to an empty string when not provided" , ( ) => {
109
- expect ( util . resolveBase ( ) ) . toBe ( "" )
110
- } )
111
- } )
112
-
113
77
describe ( "arrayify" , ( ) => {
114
78
it ( "should return value it's already an array" , ( ) => {
115
79
expect ( util . arrayify ( [ "hello" , "world" ] ) ) . toStrictEqual ( [ "hello" , "world" ] )
0 commit comments