fix: use s3 api for directory listings #72
test.yml
on: pull_request
Unit Tests
19s
E2E Tests
15s
Annotations
8 errors and 2 notices
redirects `/dist` to `/dist/` and returns expected html:
tests/e2e/index.test.ts#L1
Error [ERR_TEST_FAILURE]: Expected values to be strictly equal:
+ actual - expected
+ 'Error: R2 failed listing path nodejs/release/'
- "<!DOCTYPE html><html><head><title>Index of /dist/</title><meta name='viewport' content='width=device-width, initial-scale=1.0' /><meta charset='utf-8' /><style type='text/css'>td { padding-right: 16px; text-align: right; font-family: monospace }td:nth-of-type(1) { text-align: left; overflow-wrap: anywhere }td:nth-of-type(3) { white-space: nowrap } th { text-align: left; } @media(prefers-color-scheme: dark) { body { color: white; background-color:#1c1b22; } a { color: #3391ff; } a:visited { color: #C63B65; } }</style></head><body><h1>Index of /dist/</h1><table><tr><th>Filename</th><th>Modified</th><th>Size</th></tr><tr><td><a href='../'>../</a></td><td>-</td><td>-</td></tr><tr><td><a href='/dist/latest/'>latest/</a></td><td>-</td><td>-</td></tr><tr><td><a href='/dist/index.json'>index.json</a></td><td>2023-09-12 05:43Z</td><td>18 B</td></tr></table></body></html>"
at async Promise.all (index 0) {
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
+ actual - expected
+ 'Error: R2 failed listing path nodejs/release/'
- "<!DOCTYPE html><html><head><title>Index of /dist/</title><meta name='viewport' content='width=device-width, initial-scale=1.0' /><meta charset='utf-8' /><style type='text/css'>td { padding-right: 16px; text-align: right; font-family: monospace }td:nth-of-type(1) { text-align: left; overflow-wrap: anywhere }td:nth-of-type(3) { white-space: nowrap } th { text-align: left; } @media(prefers-color-scheme: dark) { body { color: white; background-color:#1c1b22; } a { color: #3391ff; } a:visited { color: #C63B65; } }</style></head><body><h1>Index of /dist/</h1><table><tr><th>Filename</th><th>Modified</th><th>Size</th></tr><tr><td><a href='../'>../</a></td><td>-</td><td>-</td></tr><tr><td><a href='/dist/latest/'>latest/</a></td><td>-</td><td>-</td></tr><tr><td><a href='/dist/index.json'>index.json</a></td><td>2023-09-12 05:43Z</td><td>18 B</td></tr></table></body></html>"
at TestContext.<anonymous> (/home/runner/work/release-cloudflare-worker/release-cloudflare-worker/tests/e2e/directory.test.ts:64:12)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Test.run (node:internal/test_runner/test:572:9)
at async Promise.all (index 0)
at async Suite.run (node:internal/test_runner/test:815:7)
at async startSubtest (node:internal/test_runner/harness:202:3) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 'Error: R2 failed listing path nodejs/release/',
expected: "<!DOCTYPE html><html><head><title>Index of /dist/</title><meta name='viewport' content='width=device-width, initial-scale=1.0' /><meta charset='utf-8' /><style type='text/css'>td { padding-right: 16px; text-align: right; font-family: monospace }td:nth-of-type(1) { text-align: left; overflow-wrap: anywhere }td:nth-of-type(3) { white-space: nowrap } th { text-align: left; } @media(prefers-color-scheme: dark) { body { color: white; background-color:#1c1b22; } a { color: #3391ff; } a:visited { color: #C63B65; } }</style></head><body><h1>Index of /dist/</h1><table><tr><th>Filename</th><th>Modified</th><th>Size</th></tr><tr><td><a href='../'>../</a></td><td>-</td><td>-</td></tr><tr><td><a href='/dist/latest/'>latest/</a></td><td>-</td><td>-</td></tr><tr><td><a href='/dist/index.json'>index.json</a></td><td>2023-09-12 05:43Z</td><td>18 B</td></tr></table></body></html>",
operator: 'strictEqual'
},
code: 'ERR_TEST_FAILURE'
}
|
allows `/dist/`:
tests/e2e/index.test.ts#L1
[Error [ERR_TEST_FAILURE]: Expected values to be strictly equal:
500 !== 200
] {
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
500 !== 200
at TestContext.<anonymous> (/home/runner/work/release-cloudflare-worker/release-cloudflare-worker/tests/e2e/directory.test.ts:70:12)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Test.run (node:internal/test_runner/test:572:9)
at async Suite.processPendingSubtests (node:internal/test_runner/test:316:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 500,
expected: 200,
operator: 'strictEqual'
},
code: 'ERR_TEST_FAILURE'
}
|
redirects `/download` to `/download/`:
tests/e2e/index.test.ts#L1
[Error [ERR_TEST_FAILURE]: Expected values to be strictly equal:
500 !== 200
] {
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
500 !== 200
at TestContext.<anonymous> (/home/runner/work/release-cloudflare-worker/release-cloudflare-worker/tests/e2e/directory.test.ts:79:12)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Test.run (node:internal/test_runner/test:572:9)
at async Suite.processPendingSubtests (node:internal/test_runner/test:316:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 500,
expected: 200,
operator: 'strictEqual'
},
code: 'ERR_TEST_FAILURE'
}
|
allows `/download/`:
tests/e2e/index.test.ts#L1
[Error [ERR_TEST_FAILURE]: Expected values to be strictly equal:
500 !== 200
] {
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
500 !== 200
at TestContext.<anonymous> (/home/runner/work/release-cloudflare-worker/release-cloudflare-worker/tests/e2e/directory.test.ts:84:12)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Test.run (node:internal/test_runner/test:572:9)
at async Suite.processPendingSubtests (node:internal/test_runner/test:316:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 500,
expected: 200,
operator: 'strictEqual'
},
code: 'ERR_TEST_FAILURE'
}
|
redirects `/metrics` to `/metrics/`:
tests/e2e/index.test.ts#L1
[Error [ERR_TEST_FAILURE]: Expected values to be strictly equal:
500 !== 200
] {
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
500 !== 200
at TestContext.<anonymous> (/home/runner/work/release-cloudflare-worker/release-cloudflare-worker/tests/e2e/directory.test.ts:93:12)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Test.run (node:internal/test_runner/test:572:9)
at async Suite.processPendingSubtests (node:internal/test_runner/test:316:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 500,
expected: 200,
operator: 'strictEqual'
},
code: 'ERR_TEST_FAILURE'
}
|
allows `/metrics/`:
tests/e2e/index.test.ts#L1
[Error [ERR_TEST_FAILURE]: Expected values to be strictly equal:
500 !== 200
] {
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
500 !== 200
at TestContext.<anonymous> (/home/runner/work/release-cloudflare-worker/release-cloudflare-worker/tests/e2e/directory.test.ts:98:12)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Test.run (node:internal/test_runner/test:572:9)
at async Suite.processPendingSubtests (node:internal/test_runner/test:316:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 500,
expected: 200,
operator: 'strictEqual'
},
code: 'ERR_TEST_FAILURE'
}
|
returns 404 for unknown directory:
tests/e2e/index.test.ts#L1
[Error [ERR_TEST_FAILURE]: Expected values to be strictly equal:
500 !== 404
] {
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
500 !== 404
at TestContext.<anonymous> (/home/runner/work/release-cloudflare-worker/release-cloudflare-worker/tests/e2e/directory.test.ts:114:12)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Test.run (node:internal/test_runner/test:572:9)
at async Suite.processPendingSubtests (node:internal/test_runner/test:316:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 500,
expected: 404,
operator: 'strictEqual'
},
code: 'ERR_TEST_FAILURE'
}
|
E2E Tests
Process completed with exit code 1.
|
E2E Tests
Total Tests: 20
Suites 📂: 3
Passed ✅: 13
Failed ❌: 7
Canceled 🚫: 0
Skipped ⏭️: 0
Todo 📝: 0
Duration 🕐: 3730.824ms
|
Unit Tests
Total Tests: 23
Suites 📂: 4
Passed ✅: 23
Failed ❌: 0
Canceled 🚫: 0
Skipped ⏭️: 0
Todo 📝: 0
Duration 🕐: 462.943ms
|