Skip to content

Commit

Permalink
fix: broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
MoLow committed Sep 27, 2023
2 parents 389c9e8 + 1e1ab24 commit 9cead4e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/e2e/file.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { after, before, describe, it } from 'node:test';
import assert from 'node:assert';
import { Miniflare } from 'miniflare';
import path from 'node:path';

describe('File Tests', () => {
let mf: Miniflare;
Expand Down Expand Up @@ -76,7 +75,7 @@ describe('File Tests', () => {
});

it('handles if-unmodified-since header correctly', async () => {
let res = await mf.dispatchFetch(`${url}dist/index.json`, {
const res = await mf.dispatchFetch(`${url}dist/index.json`, {
headers: {
'if-unmodified-since': new Date(0).toUTCString(),
},
Expand Down Expand Up @@ -121,13 +120,13 @@ describe('File Tests', () => {
});
assert.strictEqual(res.status, 200);

// If-None-Match w/ valid etag returns 412
// If-None-Match w/ valid etag returns 304 or 412
res = await mf.dispatchFetch(`${url}dist/index.json`, {
headers: {
'if-none-match': originalETag,
},
});
assert.strictEqual(res.status, 412);
assert(res.status === 304 || res.status === 412);
});

it('handles range header correctly', async () => {
Expand Down
File renamed without changes.
Binary file not shown.
Binary file not shown.

0 comments on commit 9cead4e

Please sign in to comment.