Skip to content

Commit

Permalink
try fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
gobengo committed Nov 11, 2023
1 parent 4ea171d commit 25e5794
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/api/test/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export function createApiMiniflare ({ initialBindings = workerGlobals, bindings
}

/**
* @param {Promise<import('http').Server>} serverPromise
* @param {import('http').Server} serverPromise
* @param {(server: import('http').Server) => Promise<void>} withServerCb
*/
export function useServer (serverPromise, withServerCb) {
Expand Down
12 changes: 7 additions & 5 deletions packages/api/test/user.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
Expand Down

0 comments on commit 25e5794

Please sign in to comment.