diff options
author | 2024-08-29 08:45:22 +0200 | |
---|---|---|
committer | 2024-08-29 08:45:22 +0200 | |
commit | b93bc0a0c70591e83a88f171dec3ba2ee8abb385 (patch) | |
tree | a24f8d900d37bbeccf48fe6b7467e97cc41bdb57 /packages/integrations/node/test/api-route.test.js | |
parent | ca01265283b6ae8d2cf478a470fe8ecf9740376b (diff) | |
download | astro-b93bc0a0c70591e83a88f171dec3ba2ee8abb385.tar.gz astro-b93bc0a0c70591e83a88f171dec3ba2ee8abb385.tar.zst astro-b93bc0a0c70591e83a88f171dec3ba2ee8abb385.zip |
chore: supress linting
Diffstat (limited to 'packages/integrations/node/test/api-route.test.js')
-rw-r--r-- | packages/integrations/node/test/api-route.test.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/integrations/node/test/api-route.test.js b/packages/integrations/node/test/api-route.test.js index 9743ce42d..63324c51c 100644 --- a/packages/integrations/node/test/api-route.test.js +++ b/packages/integrations/node/test/api-route.test.js @@ -27,6 +27,7 @@ describe('API routes', () => { it('Can get the request body', async () => { const { handler } = await import('./fixtures/api-route/dist/server/entry.mjs'); + // biome-ignore lint/style/useConst: <explanation> let { req, res, done } = createRequestAndResponse({ method: 'POST', url: '/recipes', @@ -38,8 +39,10 @@ describe('API routes', () => { handler(req, res); + // biome-ignore lint/style/useConst: <explanation> let [buffer] = await done; + // biome-ignore lint/style/useConst: <explanation> let json = JSON.parse(buffer.toString('utf-8')); assert.equal(json.length, 1); @@ -50,6 +53,7 @@ describe('API routes', () => { it('Can get binary data', async () => { const { handler } = await import('./fixtures/api-route/dist/server/entry.mjs'); + // biome-ignore lint/style/useConst: <explanation> let { req, res, done } = createRequestAndResponse({ method: 'POST', url: '/binary', @@ -61,7 +65,9 @@ describe('API routes', () => { handler(req, res); + // biome-ignore lint/style/useConst: <explanation> let [out] = await done; + // biome-ignore lint/style/useConst: <explanation> let arr = Array.from(new Uint8Array(out.buffer)); assert.deepEqual(arr, [5, 4, 3, 2, 1]); }); @@ -69,6 +75,7 @@ describe('API routes', () => { it('Can post large binary data', async () => { const { handler } = await import('./fixtures/api-route/dist/server/entry.mjs'); + // biome-ignore lint/style/useConst: <explanation> let { req, res, done } = createRequestAndResponse({ method: 'POST', url: '/hash', @@ -95,16 +102,19 @@ describe('API routes', () => { expectedDigest = hash.digest(); }); + // biome-ignore lint/style/useConst: <explanation> let [out] = await done; assert.deepEqual(new Uint8Array(out.buffer), new Uint8Array(expectedDigest)); }); it('Can bail on streaming', async () => { const { handler } = await import('./fixtures/api-route/dist/server/entry.mjs'); + // biome-ignore lint/style/useConst: <explanation> let { req, res, done } = createRequestAndResponse({ url: '/streaming', }); + // biome-ignore lint/style/useConst: <explanation> let locals = { cancelledByTheServer: false }; handler(req, res, () => {}, locals); |