From 6596aec6563810276ad8bd6c98d4da6640aba681 Mon Sep 17 00:00:00 2001 From: arty <arthur.buldauskas@itbit.com> Date: Wed, 1 May 2024 16:49:31 -0400 Subject: [PATCH] more coverage --- src/__tests__/server.test.mjs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/__tests__/server.test.mjs b/src/__tests__/server.test.mjs index d172045..41416e4 100644 --- a/src/__tests__/server.test.mjs +++ b/src/__tests__/server.test.mjs @@ -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) => {