@@ -154,22 +154,25 @@ describe("autoconfig (deploy)", () => {
154154 assets : { directory : outputDir } ,
155155 } ,
156156 } ) ) ;
157- await run . runAutoConfig ( {
158- projectPath : process . cwd ( ) ,
159- buildCommand : "echo 'built' > build.txt" ,
160- configured : false ,
161- workerName : "my-worker" ,
162- framework : {
163- name : "Fake" ,
164- configure : configureSpy ,
165- } as unknown as Framework ,
166- outputDir : "dist" ,
167- packageJson : {
168- dependencies : {
169- astro : "5" ,
157+ await run . runAutoConfig (
158+ {
159+ projectPath : process . cwd ( ) ,
160+ buildCommand : "echo 'built' > build.txt" ,
161+ configured : false ,
162+ workerName : "my-worker" ,
163+ framework : {
164+ name : "Fake" ,
165+ configure : configureSpy ,
166+ } as unknown as Framework ,
167+ outputDir : "dist" ,
168+ packageJson : {
169+ dependencies : {
170+ astro : "5" ,
171+ } ,
170172 } ,
171173 } ,
172- } ) ;
174+ { enableWranglerInstallation : true }
175+ ) ;
173176
174177 expect ( std . out ) . toMatchInlineSnapshot ( `
175178 "
@@ -184,19 +187,19 @@ describe("autoconfig (deploy)", () => {
184187 - wrangler (devDependency)
185188
186189 📝 Update package.json scripts:
187- - \\ "deploy\\ ": \\ "echo 'built' > build.txt && wrangler deploy\\ "
188- - \\ "preview\\ ": \\ "echo 'built' > build.txt && wrangler dev\\ "
190+ - "deploy": "echo 'built' > build.txt && wrangler deploy"
191+ - "preview": "echo 'built' > build.txt && wrangler dev"
189192
190193 📄 Create wrangler.jsonc:
191194 {
192- \\ "$schema\\ ": \\ "node_modules/wrangler/config-schema.json\\ ",
193- \\ "name\\ ": \\ "my-worker\\ ",
194- \\ "compatibility_date\\ ": \\ "2000-01-01\\ ",
195- \\ "observability\\ ": {
196- \\ "enabled\\ ": true
195+ "$schema": "node_modules/wrangler/config-schema.json",
196+ "name": "my-worker",
197+ "compatibility_date": "2000-01-01",
198+ "observability": {
199+ "enabled": true
197200 },
198- \\ "assets\\ ": {
199- \\ "directory\\ ": \\ "dist\\ "
201+ "assets": {
202+ "directory": "dist"
200203 }
201204 }
202205
@@ -207,14 +210,14 @@ describe("autoconfig (deploy)", () => {
207210
208211 expect ( readFileSync ( "wrangler.jsonc" ) ) . toMatchInlineSnapshot ( `
209212 "{
210- \\ "$schema\\ ": \\ "node_modules/wrangler/config-schema.json\\ ",
211- \\ "name\\ ": \\ "my-worker\\ ",
212- \\ "compatibility_date\\ ": \\ "2000-01-01\\ ",
213- \\ "observability\\ ": {
214- \\ "enabled\\ ": true
213+ "$schema": "node_modules/wrangler/config-schema.json",
214+ "name": "my-worker",
215+ "compatibility_date": "2000-01-01",
216+ "observability": {
217+ "enabled": true
215218 },
216- \\ "assets\\ ": {
217- \\ "directory\\ ": \\ "dist\\ "
219+ "assets": {
220+ "directory": "dist"
218221 }
219222 }"
220223 ` ) ;
@@ -285,29 +288,29 @@ describe("autoconfig (deploy)", () => {
285288
286289 📄 Create wrangler.jsonc:
287290 {
288- \\ "$schema\\ ": \\ "node_modules/wrangler/config-schema.json\\ ",
289- \\ "name\\ ": \\ "edited-worker-name\\ ",
290- \\ "compatibility_date\\ ": \\ "2000-01-01\\ ",
291- \\ "observability\\ ": {
292- \\ "enabled\\ ": true
291+ "$schema": "node_modules/wrangler/config-schema.json",
292+ "name": "edited-worker-name",
293+ "compatibility_date": "2000-01-01",
294+ "observability": {
295+ "enabled": true
293296 },
294- \\ "assets\\ ": {
295- \\ "directory\\ ": \\ "dist\\ "
297+ "assets": {
298+ "directory": "dist"
296299 }
297300 }
298301 "
299302 ` ) ;
300303
301304 expect ( readFileSync ( "wrangler.jsonc" ) ) . toMatchInlineSnapshot ( `
302305 "{
303- \\ "$schema\\ ": \\ "node_modules/wrangler/config-schema.json\\ ",
304- \\ "name\\ ": \\ "edited-worker-name\\ ",
305- \\ "compatibility_date\\ ": \\ "2000-01-01\\ ",
306- \\ "observability\\ ": {
307- \\ "enabled\\ ": true
306+ "$schema": "node_modules/wrangler/config-schema.json",
307+ "name": "edited-worker-name",
308+ "compatibility_date": "2000-01-01",
309+ "observability": {
310+ "enabled": true
308311 },
309- \\ "assets\\ ": {
310- \\ "directory\\ ": \\ "dist\\ "
312+ "assets": {
313+ "directory": "dist"
311314 }
312315 }"
313316 ` ) ;
0 commit comments