diff --git a/.github/workflows/ci-auth-js.yml b/.github/workflows/ci-auth-js.yml index f9e90b1a..ae16eb53 100644 --- a/.github/workflows/ci-auth-js.yml +++ b/.github/workflows/ci-auth-js.yml @@ -19,7 +19,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 18.x + node-version: 20.x - run: yarn install --frozen-lockfile - run: yarn build - run: yarn test diff --git a/packages/auth-js/test/index.test.ts b/packages/auth-js/test/index.test.ts index ec0aad25..a343d2d3 100644 --- a/packages/auth-js/test/index.test.ts +++ b/packages/auth-js/test/index.test.ts @@ -3,14 +3,9 @@ import type { Adapter } from '@auth/core/adapters' import Credentials from '@auth/core/providers/credentials' import { Hono } from 'hono' import { describe, expect, it, vi } from 'vitest' -import { webcrypto } from 'node:crypto' import type { AuthConfig } from '../src' import { authHandler, verifyAuth, initAuthConfig, reqWithEnvUrl } from '../src' -// @ts-expect-error - global crypto -//needed for node 18 and below but should work in node 20 and above -global.crypto = webcrypto - describe('Config', () => { it('Should return 500 if AUTH_SECRET is missing', async () => { globalThis.process.env = { AUTH_SECRET: '' }