Skip to content

Commit

Permalink
more coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
ballercat committed May 1, 2024
1 parent 1229f12 commit 6596aec
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/__tests__/server.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,16 @@ test.serial('cors support', async (t) => {
// OPTIONS should 204 automatically
let response = await fetch(`http://jambox.test.com/foobar`, opts);
t.like(response, { status: 204, statusText: 'No Content' });

response = await fetch(`http://jambox.test.com/foobar`, {
...opts,
method: 'GET',
});

t.like(Object.fromEntries(response.headers.entries()), {
// This is set by jambox automatically when cors is enabled
'access-control-allow-origin': '*',
});
});

test.serial('auto mocks', async (t) => {
Expand Down

0 comments on commit 6596aec

Please sign in to comment.