Skip to content

Commit

Permalink
chore: move assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeed committed Apr 24, 2023
1 parent eb1ccce commit 540064f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/sirv.js
Original file line number Diff line number Diff line change
Expand Up @@ -1038,10 +1038,9 @@ ranges('should shrink range end if it cannot be met (overflow)', async () => {
try {
let headers = { Range: 'bytes=10-123456' };
let file = await utils.lookup('bundle.67329.js', 'utf8');
await server.send('GET', '/bundle.67329.js', { headers }).then(res => {
assert.is(res.headers['content-range'], `bytes 10-${file.size - 1}/${file.size}`);
assert.is(res.statusCode, 206);
});
let res = await server.send('GET', '/bundle.67329.js', { headers });
assert.is(res.headers['content-range'], `bytes 10-${file.size - 1}/${file.size}`);
assert.is(res.statusCode, 206);
} finally {
server.close();
}
Expand Down

0 comments on commit 540064f

Please sign in to comment.