File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -164,12 +164,28 @@ describe('pluginUrlsSchema', () => {
164164 } ) ;
165165
166166 it ( 'should throw for invalid URL' , ( ) => {
167- expect ( ( ) => pluginUrlsSchema . parse ( 'not-a-url ' ) ) . toThrow ( ) ;
167+ expect ( ( ) => pluginUrlsSchema . parse ( 'invalid ' ) ) . toThrow ( ) ;
168168 } ) ;
169169
170170 it ( 'should throw for array with invalid URL' , ( ) => {
171171 expect ( ( ) =>
172172 pluginUrlsSchema . parse ( [ 'https://example.com' , 'invalid' ] ) ,
173173 ) . toThrow ( ) ;
174174 } ) ;
175+
176+ it ( 'should throw for object with invalid URL' , ( ) => {
177+ expect ( ( ) => pluginUrlsSchema . parse ( { invalid : 1 } ) ) . toThrow ( ) ;
178+ } ) ;
179+
180+ it ( 'should throw for invalid negative weight' , ( ) => {
181+ expect ( ( ) =>
182+ pluginUrlsSchema . parse ( { 'https://example.com' : - 1 } ) ,
183+ ) . toThrow ( ) ;
184+ } ) ;
185+
186+ it ( 'should throw for invalid string weight' , ( ) => {
187+ expect ( ( ) =>
188+ pluginUrlsSchema . parse ( { 'https://example.com' : '1' } ) ,
189+ ) . toThrow ( ) ;
190+ } ) ;
175191} ) ;
You can’t perform that action at this time.
0 commit comments