From 25e5794b2b5aa3d001d2a1bde6c4f259c323240a Mon Sep 17 00:00:00 2001 From: bengo <171782+gobengo@users.noreply.github.com> Date: Fri, 10 Nov 2023 16:33:46 -0800 Subject: [PATCH] try fix ci --- packages/api/test/hooks.js | 2 +- packages/api/test/user.spec.js | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/api/test/hooks.js b/packages/api/test/hooks.js index 120d016301..09ea2176a4 100644 --- a/packages/api/test/hooks.js +++ b/packages/api/test/hooks.js @@ -150,7 +150,7 @@ export function createApiMiniflare ({ initialBindings = workerGlobals, bindings } /** - * @param {Promise} serverPromise + * @param {import('http').Server} serverPromise * @param {(server: import('http').Server) => Promise} withServerCb */ export function useServer (serverPromise, withServerCb) { diff --git a/packages/api/test/user.spec.js b/packages/api/test/user.spec.js index ad85fdac53..fe55764dd7 100644 --- a/packages/api/test/user.spec.js +++ b/packages/api/test/user.spec.js @@ -574,11 +574,13 @@ describe('userLoginPost', function () { * we're going to create a server with the appropriate configuration using miniflare, * boot the server, then request POST /user/login and assert about the response. */ - const apiEnv = { - NEXT_PUBLIC_W3UP_LAUNCH_LIMITED_AVAILABILITY_START: (new Date(0)).toISOString(), - NEXT_PUBLIC_MAGIC_TESTMODE_ENABLED: 'true' - } - await useServer(createApiMiniflare({ bindings: apiEnv }).startServer(), async (server) => { + const server = await createApiMiniflare({ + bindings: { + NEXT_PUBLIC_W3UP_LAUNCH_LIMITED_AVAILABILITY_START: (new Date(0)).toISOString(), + NEXT_PUBLIC_MAGIC_TESTMODE_ENABLED: 'true' + } + }).startServer() + await useServer(server, async (server) => { const loginEndpoint = new URL('/user/login', getServerUrl(server)) const user = { publicAddress: BigInt(Math.round(Math.random() * Number.MAX_SAFE_INTEGER)),