@@ -2302,69 +2302,6 @@ describe("normalizeAndValidateConfig()", () => {
23022302 } ) ;
23032303 } ) ;
23042304
2305- // Images
2306- describe ( "[images]" , ( ) => {
2307- it ( "should error if images is an array" , ( ) => {
2308- const { diagnostics } = normalizeAndValidateConfig (
2309- { images : [ ] } as unknown as RawConfig ,
2310- undefined ,
2311- undefined ,
2312- { env : undefined }
2313- ) ;
2314-
2315- expect ( diagnostics . hasWarnings ( ) ) . toBe ( false ) ;
2316- expect ( diagnostics . renderErrors ( ) ) . toMatchInlineSnapshot ( `
2317- "Processing wrangler configuration:
2318- - The field \\"images\\" should be an object but got []."
2319- ` ) ;
2320- } ) ;
2321-
2322- it ( "should error if images is a string" , ( ) => {
2323- const { diagnostics } = normalizeAndValidateConfig (
2324- { images : "BAD" } as unknown as RawConfig ,
2325- undefined ,
2326- undefined ,
2327- { env : undefined }
2328- ) ;
2329-
2330- expect ( diagnostics . hasWarnings ( ) ) . toBe ( false ) ;
2331- expect ( diagnostics . renderErrors ( ) ) . toMatchInlineSnapshot ( `
2332- "Processing wrangler configuration:
2333- - The field \\"images\\" should be an object but got \\"BAD\\"."
2334- ` ) ;
2335- } ) ;
2336-
2337- it ( "should error if images is a number" , ( ) => {
2338- const { diagnostics } = normalizeAndValidateConfig (
2339- { images : 999 } as unknown as RawConfig ,
2340- undefined ,
2341- undefined ,
2342- { env : undefined }
2343- ) ;
2344-
2345- expect ( diagnostics . hasWarnings ( ) ) . toBe ( false ) ;
2346- expect ( diagnostics . renderErrors ( ) ) . toMatchInlineSnapshot ( `
2347- "Processing wrangler configuration:
2348- - The field \\"images\\" should be an object but got 999."
2349- ` ) ;
2350- } ) ;
2351-
2352- it ( "should error if ai is null" , ( ) => {
2353- const { diagnostics } = normalizeAndValidateConfig (
2354- { images : null } as unknown as RawConfig ,
2355- undefined ,
2356- undefined ,
2357- { env : undefined }
2358- ) ;
2359-
2360- expect ( diagnostics . hasWarnings ( ) ) . toBe ( false ) ;
2361- expect ( diagnostics . renderErrors ( ) ) . toMatchInlineSnapshot ( `
2362- "Processing wrangler configuration:
2363- - The field \\"images\\" should be an object but got null."
2364- ` ) ;
2365- } ) ;
2366- } ) ;
2367-
23682305 // Worker Version Metadata
23692306 describe ( "[version_metadata]" , ( ) => {
23702307 it ( "should error if version_metadata is an array" , ( ) => {
0 commit comments