feat(serve-static): support absolute root #5569
ci.yml
on: pull_request
Matrix: node
Main
58s
Fastly Compute
20s
workerd
27s
AWS Lambda
20s
Lambda@Edge
18s
Coverage
0s
Annotations
17 errors and 6 warnings
error: expect(received).toBe(expected):
runtime-tests/bun/index.test.tsx#L134
Expected: 200
Received: 404
at /home/runner/work/hono/hono/runtime-tests/bun/index.test.tsx:134:24
|
error: expect(received).toBe(expected):
runtime-tests/bun/index.test.tsx#L141
Expected: 200
Received: 404
at /home/runner/work/hono/hono/runtime-tests/bun/index.test.tsx:141:24
|
error: expect(received).toBe(expected):
runtime-tests/bun/index.test.tsx#L148
Expected: 200
Received: 404
at /home/runner/work/hono/hono/runtime-tests/bun/index.test.tsx:148:24
|
error: expect(received).toBe(expected):
runtime-tests/bun/index.test.tsx#L154
Expected: 200
Received: 404
at /home/runner/work/hono/hono/runtime-tests/bun/index.test.tsx:154:24
|
error: expect(received).toBe(expected):
runtime-tests/bun/index.test.tsx#L160
Expected: 200
Received: 404
at /home/runner/work/hono/hono/runtime-tests/bun/index.test.tsx:160:24
|
Bun
Process completed with exit code 1.
|
Deno
Process completed with exit code 1.
|
src/adapter/cloudflare-workers/serve-static.test.ts > ServeStatic Middleware > Should return plain.txt:
src/adapter/cloudflare-workers/serve-static.test.ts#L55
AssertionError: expected 404 to be 200 // Object.is equality
- Expected
+ Received
- 200
+ 404
❯ src/adapter/cloudflare-workers/serve-static.test.ts:55:24
|
src/adapter/cloudflare-workers/serve-static.test.ts > ServeStatic Middleware > Should return hono.html:
src/adapter/cloudflare-workers/serve-static.test.ts#L63
AssertionError: expected 404 to be 200 // Object.is equality
- Expected
+ Received
- 200
+ 404
❯ src/adapter/cloudflare-workers/serve-static.test.ts:63:24
|
src/adapter/cloudflare-workers/serve-static.test.ts > ServeStatic Middleware > Should return 404 response:
src/adapter/cloudflare-workers/serve-static.test.ts#L72
AssertionError: expected "spy" to be called with arguments: [ Array(2) ]
Received:
1st spy call:
Array [
- "assets/static/not-found.html",
- Anything,
+ "static/not-found.html",
+ Context {
+ "body": [Function body],
+ "env": undefined,
+ "error": undefined,
+ "finalized": true,
+ "get": [Function get],
+ "getLayout": [Function getLayout],
+ "header": [Function header],
+ "html": [Function html],
+ "json": [Function json],
+ "newResponse": [Function newResponse],
+ "notFound": [Function notFound],
+ "redirect": [Function redirect],
+ "render": [Function render],
+ "set": [Function set],
+ "setLayout": [Function setLayout],
+ "setRenderer": [Function setRenderer],
+ "status": [Function status],
+ "text": [Function text],
+ },
]
Number of calls: 1
❯ src/adapter/cloudflare-workers/serve-static.test.ts:72:24
|
src/adapter/cloudflare-workers/serve-static.test.ts > ServeStatic Middleware > Should return index.html:
src/adapter/cloudflare-workers/serve-static.test.ts#L84
AssertionError: expected 404 to be 200 // Object.is equality
- Expected
+ Received
- 200
+ 404
❯ src/adapter/cloudflare-workers/serve-static.test.ts:84:24
|
src/adapter/cloudflare-workers/serve-static.test.ts > ServeStatic Middleware > Should return plain.txt with a rewriteRequestPath option:
src/adapter/cloudflare-workers/serve-static.test.ts#L91
AssertionError: expected 404 to be 200 // Object.is equality
- Expected
+ Received
- 200
+ 404
❯ src/adapter/cloudflare-workers/serve-static.test.ts:91:24
|
src/adapter/cloudflare-workers/serve-static.test.ts > With options > Should return foo.txt:
src/adapter/cloudflare-workers/serve-static.test.ts#L107
AssertionError: expected 404 to be 200 // Object.is equality
- Expected
+ Received
- 200
+ 404
❯ src/adapter/cloudflare-workers/serve-static.test.ts:107:24
|
src/adapter/cloudflare-workers/serve-static.test.ts > With `file` options > Should return hono.html - with `root` option:
src/adapter/cloudflare-workers/serve-static.test.ts#L126
AssertionError: expected 404 to be 200 // Object.is equality
- Expected
+ Received
- 200
+ 404
❯ src/adapter/cloudflare-workers/serve-static.test.ts:126:24
|
src/adapter/cloudflare-workers/serve-static.test.ts > With `mimes` options > Should return content-type of m3u8:
src/adapter/cloudflare-workers/serve-static.test.ts#L147
AssertionError: expected 404 to be 200 // Object.is equality
- Expected
+ Received
- 200
+ 404
❯ src/adapter/cloudflare-workers/serve-static.test.ts:147:24
|
src/adapter/cloudflare-workers/serve-static.test.ts > With `mimes` options > Should return content-type of ts:
src/adapter/cloudflare-workers/serve-static.test.ts#L152
AssertionError: expected 404 to be 200 // Object.is equality
- Expected
+ Received
- 200
+ 404
❯ src/adapter/cloudflare-workers/serve-static.test.ts:152:24
|
src/adapter/cloudflare-workers/serve-static.test.ts > With `mimes` options > Should return content-type of default on Hono:
src/adapter/cloudflare-workers/serve-static.test.ts#L157
AssertionError: expected 404 to be 200 // Object.is equality
- Expected
+ Received
- 200
+ 404
❯ src/adapter/cloudflare-workers/serve-static.test.ts:157:24
|
Main:
src/client/types.test.ts#L7
'app' is assigned a value but only used as a type
|
Main:
src/client/types.test.ts#L28
'app' is assigned a value but only used as a type
|
Main:
src/client/types.test.ts#L45
'app' is assigned a value but only used as a type
|
Main:
src/helper/factory/index.test.ts#L22
'route' is assigned a value but only used as a type
|
Main:
src/helper/factory/index.test.ts#L54
'routesA' is assigned a value but only used as a type
|
Main:
src/helper/ssg/ssg.test.tsx#L97
'c' is defined but only used as a type
|
Artifacts
Produced during runtime
Name | Size | |
---|---|---|
coverage-fastly
|
665 KB |
|
coverage-lambda
|
673 KB |
|
coverage-lambda-edge
|
667 KB |
|
coverage-node
|
670 KB |
|
coverage-workerd
|
651 KB |
|