@@ -17,8 +17,10 @@ import {
1717import { execAsync } from '@/common/utils.js'
1818import { INPUT_KEY_WORKING_DIRECTORY } from '@/input-keys'
1919
20- vi . mock ( '@/common/utils.js' )
21- vi . mock ( '@actions/core' )
20+ import packageJson from '../../../../package.json' with { type : 'json' }
21+
22+ vi . mock ( import ( '@/common/utils.js' ) )
23+ vi . mock ( import ( '@actions/core' ) )
2224
2325describe ( createCloudflareDeployment , ( ) => {
2426 describe ( 'api calls' , ( ) => {
@@ -57,7 +59,7 @@ describe(createCloudflareDeployment, () => {
5759 ) . rejects . toThrowErrorMatchingInlineSnapshot ( `[Error: Oh no!]` )
5860
5961 expect ( execAsync ) . toHaveBeenCalledWith (
60- `npx wrangler@^4.34.0 pages deploy mock-directory --project-name=mock-cloudflare-project-name --branch=mock-github-head-ref --commit-dirty=true --commit-hash=mock-github-sha` ,
62+ `npx wrangler@${ packageJson . devDependencies . wrangler } pages deploy mock-directory --project-name=mock-cloudflare-project-name --branch=mock-github-head-ref --commit-dirty=true --commit-hash=mock-github-sha` ,
6163 {
6264 // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
6365 env : expect . objectContaining ( {
@@ -143,7 +145,7 @@ describe(createCloudflareDeployment, () => {
143145 // vi.advanceTimersByTime(2000)
144146
145147 expect ( execAsync ) . toHaveBeenCalledWith (
146- `npx wrangler@^4.34.0 pages deploy mock-directory --project-name=mock-cloudflare-project-name --branch=mock-github-head-ref --commit-dirty=true --commit-hash=mock-github-sha` ,
148+ `npx wrangler@${ packageJson . devDependencies . wrangler } pages deploy mock-directory --project-name=mock-cloudflare-project-name --branch=mock-github-head-ref --commit-dirty=true --commit-hash=mock-github-sha` ,
147149 {
148150 // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
149151 env : expect . objectContaining ( {
0 commit comments