@@ -4446,88 +4446,6 @@ addEventListener('fetch', event => {});`
44464446 ` ) ;
44474447 } ) ;
44484448
4449- it ( "should warn when using smart placement with assets-first" , async ( ) => {
4450- const assets = [
4451- { filePath : ".assetsignore" , content : "*.bak\nsub-dir" } ,
4452- { filePath : "file-1.txt" , content : "Content of file-1" } ,
4453- { filePath : "file-2.bak" , content : "Content of file-2" } ,
4454- { filePath : "file-3.txt" , content : "Content of file-3" } ,
4455- { filePath : "sub-dir/file-4.bak" , content : "Content of file-4" } ,
4456- { filePath : "sub-dir/file-5.txt" , content : "Content of file-5" } ,
4457- ] ;
4458- writeAssets ( assets , "assets" ) ;
4459- writeWranglerConfig ( {
4460- assets : {
4461- directory : "assets" ,
4462- experimental_serve_directly : true ,
4463- } ,
4464- placement : {
4465- mode : "smart" ,
4466- } ,
4467- } ) ;
4468- const bodies : AssetManifest [ ] = [ ] ;
4469- await mockAUSRequest ( bodies ) ;
4470- mockSubDomainRequest ( ) ;
4471- mockUploadWorkerRequest ( {
4472- expectedAssets : {
4473- jwt : "<<aus-completion-token>>" ,
4474- config : {
4475- serve_directly : true ,
4476- } ,
4477- } ,
4478- expectedType : "none" ,
4479- } ) ;
4480-
4481- await runWrangler ( "deploy" ) ;
4482-
4483- expect ( std . warn ) . toMatchInlineSnapshot ( `
4484- "[33m▲ [43;33m[[43;30mWARNING[43;33m][0m [1mUsing assets with smart placement turned on may result in poor performance.[0m
4485-
4486- "
4487- ` ) ;
4488- } ) ;
4489-
4490- it ( "should warn when using smart placement with assets-first" , async ( ) => {
4491- const assets = [
4492- { filePath : ".assetsignore" , content : "*.bak\nsub-dir" } ,
4493- { filePath : "file-1.txt" , content : "Content of file-1" } ,
4494- { filePath : "file-2.bak" , content : "Content of file-2" } ,
4495- { filePath : "file-3.txt" , content : "Content of file-3" } ,
4496- { filePath : "sub-dir/file-4.bak" , content : "Content of file-4" } ,
4497- { filePath : "sub-dir/file-5.txt" , content : "Content of file-5" } ,
4498- ] ;
4499- writeAssets ( assets , "assets" ) ;
4500- writeWranglerConfig ( {
4501- assets : {
4502- directory : "assets" ,
4503- experimental_serve_directly : true ,
4504- } ,
4505- placement : {
4506- mode : "smart" ,
4507- } ,
4508- } ) ;
4509- const bodies : AssetManifest [ ] = [ ] ;
4510- await mockAUSRequest ( bodies ) ;
4511- mockSubDomainRequest ( ) ;
4512- mockUploadWorkerRequest ( {
4513- expectedAssets : {
4514- jwt : "<<aus-completion-token>>" ,
4515- config : {
4516- serve_directly : true ,
4517- } ,
4518- } ,
4519- expectedType : "none" ,
4520- } ) ;
4521-
4522- await runWrangler ( "deploy" ) ;
4523-
4524- expect ( std . warn ) . toMatchInlineSnapshot ( `
4525- "[33m▲ [43;33m[[43;30mWARNING[43;33m][0m [1mUsing assets with smart placement turned on may result in poor performance.[0m
4526-
4527- "
4528- ` ) ;
4529- } ) ;
4530-
45314449 it ( "should warn if experimental_serve_directly=false but no binding is provided" , async ( ) => {
45324450 const assets = [
45334451 { filePath : ".assetsignore" , content : "*.bak\nsub-dir" } ,
@@ -4562,13 +4480,18 @@ addEventListener('fetch', event => {});`
45624480 await runWrangler ( "deploy" ) ;
45634481
45644482 expect ( std . warn ) . toMatchInlineSnapshot ( `
4565- "[33m▲ [43;33m[[43;30mWARNING[43;33m][0m [1mexperimental_serve_directly=false but no assets.binding provided.[0m
4483+ "[33m▲ [43;33m[[43;30mWARNING[43;33m][0m [1mexperimental_serve_directly=false set without an assets binding[0m
4484+
4485+ Setting experimental_serve_directly to false will always invoke your Worker script.
4486+ To fetch your assets from your Worker, please set [assets.binding] in your configuration file.
4487+
4488+ Read more: [4mhttps://developers.cloudflare.com/workers/static-assets/binding/#binding[0m
45664489
45674490 "
45684491 ` ) ;
45694492 } ) ;
45704493
4571- it ( "should error if an experimental_serve_directly is false without providing a user Worker" , async ( ) => {
4494+ it ( "should error if experimental_serve_directly is false and no user Worker is provided " , async ( ) => {
45724495 writeWranglerConfig ( {
45734496 assets : {
45744497 directory : "xyz" ,
0 commit comments