fix: use same directory listing format as nginx #109
test.yml
on: pull_request
Unit Tests
11s
E2E Tests
22s
Annotations
2 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
+ '<!DOCTYPE html><html>\n' +
+ '<head><title>Index of /dist/</title></head>\n' +
+ '<body>\n' +
+ '<h1>Index of /dist/</h1><hr><pre><a href="../">../</a><br />\n' +
+ '<a href="latest/">latest/</a> - -<br />\n' +
+ '<a href="/dist/index.json">index.json</a> 2023-09-12 05:43Z 18 B<br />\n' +
+ '</pre><hr></body>\n' +
+ '</html>'
- "<!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
+ '<!DOCTYPE html><html>\n' +
+ '<head><title>Index of /dist/</title></head>\n' +
+ '<body>\n' +
+ '<h1>Index of /dist/</h1><hr><pre><a href="../">../</a><br />\n' +
+ '<a href="latest/">latest/</a> - -<br />\n' +
+ '<a href="/dist/index.json">index.json</a> 2023-09-12 05:43Z 18 B<br />\n' +
+ '</pre><hr></body>\n' +
+ '</html>'
- "<!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:96: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: '<!DOCTYPE html><html>\n<head><title>Index of /dist/</title></head>\n<body>\n<h1>Index of /dist/</h1><hr><pre><a href="../">../</a><br />\n<a href="latest/">latest/</a> - -<br />\n<a href="/dist/index.json">index.json</a> 2023-09-12 05:43Z 18 B<br />\n</pre><hr></body>\n</html>',
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
|
E2E Tests
Process completed with exit code 1.
|
Unit Tests
Total Tests: 26
Suites 📂: 4
Passed ✅: 26
Failed ❌: 0
Canceled 🚫: 0
Skipped ⏭️: 0
Todo 📝: 0
Duration 🕐: 259.682ms
|
E2E Tests
Total Tests: 24
Suites 📂: 3
Passed ✅: 23
Failed ❌: 1
Canceled 🚫: 0
Skipped ⏭️: 0
Todo 📝: 0
Duration 🕐: 4849.199ms
|