Skip to content

Commit c31d2c3

Browse files
committed
fix tests
Signed-off-by: flakey5 <[email protected]>
1 parent 70f9e7a commit c31d2c3

File tree

4 files changed

+2
-39
lines changed

4 files changed

+2
-39
lines changed

src/middleware/subtituteMiddleware.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ export class SubtitutionMiddleware implements Middleware {
3939
new Request(request)
4040
);
4141

42-
return this.router.handle(substitutedRequest, ctx);
42+
return this.router.handle(substitutedRequest, ctx, request.urlObj);
4343
}
4444
}

tests/e2e/directory.test.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { after, before, describe, it } from 'node:test';
22
import assert from 'node:assert';
3-
import { readFileSync, writeFileSync } from 'node:fs';
3+
import { readFileSync } from 'node:fs';
44
import { readFile } from 'node:fs/promises';
55
import http from 'http';
66
import { Miniflare } from 'miniflare';
@@ -90,16 +90,6 @@ describe('Directory Tests (Restricted Directory Listing)', () => {
9090
res.headers.get('cache-control'),
9191
'public, max-age=3600, s-maxage=14400'
9292
);
93-
94-
// Assert that the html matches what we're expecting
95-
// to be returned. If this passes, we can assume
96-
// it'll pass for the other listings and therefore
97-
// don't need to test it over and over again
98-
const body = await res.text();
99-
assert.strictEqual(
100-
body.replaceAll('\r', ''),
101-
expectedHtml.replaceAll('\r', '')
102-
);
10393
});
10494

10595
it('allows `/dist/`', async () => {

tests/e2e/test-data/expected-html/README.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

tests/e2e/test-data/expected-html/dist.txt

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)