Skip to content

Commit

Permalink
fix: update method calls in existing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ankushg committed Sep 24, 2021
1 parent 5b139f8 commit 8d50387
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions test/cloudflare.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ test('getDeploymentUrl() should return a Cloudflare build', async () => {
'user@example.com',
'cf-project',
'website',
'fix/test-1'
'fix/test-1',
'preview',
null
)

expect(url).toEqual('https://123.cf-project.pages.dev')
Expand All @@ -87,7 +89,9 @@ test('getDeploymentUrl() should fail if there are no deployments', async () => {
'user@example.com',
'cf-project',
'website',
'fix/test-1'
'fix/test-1',
'preview',
null
)
).rejects.toThrow()
})
Expand All @@ -110,6 +114,13 @@ test('getDeploymentUrl() should fail if there are no matching builds', async ()
axios.get.mockResolvedValueOnce(data)

await expect(
getDeploymentUrl('123xyz', 'zentered', 'fix/huge-bug', 'zentered.co')
getDeploymentUrl(
'123xyz',
'zentered',
'fix/huge-bug',
'zentered.co',
'preview',
null
)
).rejects.toThrow()
})

0 comments on commit 8d50387

Please sign in to comment.