From e6d0f4ac59a66503de1a43363a630f59588ee53e Mon Sep 17 00:00:00 2001 From: Jacek Date: Fri, 11 Oct 2024 09:14:04 -0500 Subject: [PATCH] WIP --- packages/nextjs/jest.config.js | 16 ---------------- packages/nextjs/jest.setup.js | 1 - packages/nextjs/package.json | 4 +--- .../src/server/__tests__/clerkClient.test.ts | 4 ++-- packages/nextjs/vitest.setup.mts | 2 +- 5 files changed, 4 insertions(+), 23 deletions(-) delete mode 100644 packages/nextjs/jest.config.js delete mode 100644 packages/nextjs/jest.setup.js diff --git a/packages/nextjs/jest.config.js b/packages/nextjs/jest.config.js deleted file mode 100644 index 9d0b6fa76b..0000000000 --- a/packages/nextjs/jest.config.js +++ /dev/null @@ -1,16 +0,0 @@ -const { name } = require('./package.json'); - -/** @type {import('ts-jest').JestConfigWithTsJest} */ -module.exports = { - globals: { - PACKAGE_NAME: '@clerk/nextjs', - PACKAGE_VERSION: '0.0.0-test', - }, - displayName: name.replace('@clerk', ''), - injectGlobals: true, - roots: ['/src'], - testMatch: ['**/?(*.)+(spec|test).+(ts|tsx|js)'], - transform: { '^.+\\.m?tsx?$': ['ts-jest', { tsconfig: 'tsconfig.test.json' }] }, - setupFilesAfterEnv: ['/jest.setup.js'], - testPathIgnorePatterns: ['/node_modules/', '/jest/', '/.turbo', '/dist/', '/examples'], -}; diff --git a/packages/nextjs/jest.setup.js b/packages/nextjs/jest.setup.js deleted file mode 100644 index 1a5dcdc343..0000000000 --- a/packages/nextjs/jest.setup.js +++ /dev/null @@ -1 +0,0 @@ -process.env.CLERK_SECRET_KEY = 'TEST_SECRET_KEY'; diff --git a/packages/nextjs/package.json b/packages/nextjs/package.json index 449a4f83e7..d6518a3228 100644 --- a/packages/nextjs/package.json +++ b/packages/nextjs/package.json @@ -62,9 +62,7 @@ "lint:attw": "attw --pack . --ignore-rules no-resolution unexpected-module-syntax", "lint:publint": "publint", "publish:local": "npx yalc push --replace --sig", - "test": "vitest", - "test:cache:clear": "jest --clearCache --useStderr", - "test:ci": "jest --maxWorkers=70%" + "test": "vitest" }, "dependencies": { "@clerk/backend": "1.13.9", diff --git a/packages/nextjs/src/server/__tests__/clerkClient.test.ts b/packages/nextjs/src/server/__tests__/clerkClient.test.ts index 1c3b1f58af..6d263581fc 100644 --- a/packages/nextjs/src/server/__tests__/clerkClient.test.ts +++ b/packages/nextjs/src/server/__tests__/clerkClient.test.ts @@ -26,14 +26,14 @@ describe('clerkClient', () => { sdkMetadata: { environment: 'test', name: '@clerk/nextjs', - version: '1', + version: '0.0.0-test', }, secretKey: 'TEST_SECRET_KEY', telemetry: { debug: false, disabled: false, }, - userAgent: '@clerk/nextjs@1', + userAgent: '@clerk/nextjs@0.0.0-test', }); }); }); diff --git a/packages/nextjs/vitest.setup.mts b/packages/nextjs/vitest.setup.mts index 13cc1297db..74ed934d85 100644 --- a/packages/nextjs/vitest.setup.mts +++ b/packages/nextjs/vitest.setup.mts @@ -1,6 +1,6 @@ import { beforeAll } from 'vitest'; globalThis.PACKAGE_NAME = '@clerk/nextjs'; -globalThis.PACKAGE_VERSION = '1'; +globalThis.PACKAGE_VERSION = '0.0.0-test'; beforeAll(() => {});