Skip to content

Commit

Permalink
test: update notFoundHandler's callback expect
Browse files Browse the repository at this point in the history
  • Loading branch information
sor4chi committed Dec 27, 2023
1 parent 151ee41 commit c92892e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion runtime_tests/bun/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ describe('Serve Static Middleware', () => {
const res = await app.request(new Request('http://localhost/favicon-notfound.ico'))
expect(res.status).toBe(404)
expect(res.headers.get('X-Custom')).toBe('Bun')
expect(onNotFound).toHaveBeenCalledWith('./runtime_tests/bun/favicon-notfound.ico')
expect(onNotFound).toHaveBeenCalledWith(
'./runtime_tests/bun/favicon-notfound.ico',
expect.anything()
)
})

it('Should return 200 response - /static/plain.txt', async () => {
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/cloudflare-workers/serve-static.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ describe('ServeStatic Middleware', () => {
it('Should return 404 response', async () => {
const res = await app.request('http://localhost/static/not-found.html')
expect(res.status).toBe(404)
expect(onNotFound).toHaveBeenCalledWith('assets/static/not-found.html')
expect(onNotFound).toHaveBeenCalledWith('assets/static/not-found.html', expect.anything())
})

it('Should return plan.txt', async () => {
Expand Down

0 comments on commit c92892e

Please sign in to comment.