From 661f206df29e028faa9076e4439a6f092b528f54 Mon Sep 17 00:00:00 2001 From: R-M-Naveen Date: Thu, 28 May 2026 17:23:00 -0500 Subject: [PATCH 1/2] test: run workspace vitest files serially --- packages/atxp-base/package.json | 2 +- packages/atxp-client/package.json | 2 +- packages/atxp-cloudflare/package.json | 2 +- packages/atxp-common/package.json | 2 +- packages/atxp-express/package.json | 2 +- packages/atxp-mpp/package.json | 2 +- packages/atxp-polygon/package.json | 2 +- packages/atxp-redis/package.json | 2 +- packages/atxp-server/package.json | 2 +- packages/atxp-solana/package.json | 2 +- packages/atxp-sqlite/package.json | 2 +- packages/atxp-tempo/package.json | 2 +- packages/atxp-worldchain/package.json | 2 +- packages/atxp-x402/package.json | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/atxp-base/package.json b/packages/atxp-base/package.json index 3107baa..637d8c1 100644 --- a/packages/atxp-base/package.json +++ b/packages/atxp-base/package.json @@ -28,7 +28,7 @@ "typecheck": "tsc --noEmit", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "test": "vitest run", + "test": "vitest run --fileParallelism=false", "prepack": "npm run build && npm run typecheck", "pack:dry": "npm pack --dry-run" }, diff --git a/packages/atxp-client/package.json b/packages/atxp-client/package.json index 0f80553..e848675 100644 --- a/packages/atxp-client/package.json +++ b/packages/atxp-client/package.json @@ -28,7 +28,7 @@ "typecheck": "tsc --noEmit", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "test": "vitest run", + "test": "vitest run --fileParallelism=false", "prepack": "npm run build && npm run typecheck", "pack:dry": "npm pack --dry-run" }, diff --git a/packages/atxp-cloudflare/package.json b/packages/atxp-cloudflare/package.json index b6536f6..aed6ce5 100644 --- a/packages/atxp-cloudflare/package.json +++ b/packages/atxp-cloudflare/package.json @@ -28,7 +28,7 @@ "typecheck": "tsc --noEmit", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "test": "vitest run", + "test": "vitest run --fileParallelism=false", "prepack": "npm run build && npm run typecheck", "pack:dry": "npm pack --dry-run" }, diff --git a/packages/atxp-common/package.json b/packages/atxp-common/package.json index cfdec39..277d477 100644 --- a/packages/atxp-common/package.json +++ b/packages/atxp-common/package.json @@ -38,7 +38,7 @@ "typecheck": "tsc --noEmit", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "test": "vitest run", + "test": "vitest run --fileParallelism=false", "test:integration": "vitest run --testTimeout=120000 src/**/*.integration.test.ts", "test:package-managers": "vitest run --testTimeout=120000 src/platform/packageManager.integration.test.ts", "prepack": "npm run build && npm run typecheck", diff --git a/packages/atxp-express/package.json b/packages/atxp-express/package.json index ff9d29b..b29e08d 100644 --- a/packages/atxp-express/package.json +++ b/packages/atxp-express/package.json @@ -28,7 +28,7 @@ "typecheck": "tsc --noEmit", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "test": "vitest run", + "test": "vitest run --fileParallelism=false", "prepack": "npm run build && npm run typecheck", "pack:dry": "npm pack --dry-run" }, diff --git a/packages/atxp-mpp/package.json b/packages/atxp-mpp/package.json index ba62d2f..928d85a 100644 --- a/packages/atxp-mpp/package.json +++ b/packages/atxp-mpp/package.json @@ -28,7 +28,7 @@ "typecheck": "tsc --noEmit", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "test": "vitest run", + "test": "vitest run --fileParallelism=false", "prepack": "npm run build && npm run typecheck", "pack:dry": "npm pack --dry-run" }, diff --git a/packages/atxp-polygon/package.json b/packages/atxp-polygon/package.json index d2e9830..12f24e7 100644 --- a/packages/atxp-polygon/package.json +++ b/packages/atxp-polygon/package.json @@ -28,7 +28,7 @@ "typecheck": "tsc --noEmit", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "test": "vitest run", + "test": "vitest run --fileParallelism=false", "test:browser": "npm run build && npm run serve:test", "serve:test": "npx -y http-server -p 8000 -c-1 --cors", "prepack": "npm run build && npm run typecheck", diff --git a/packages/atxp-redis/package.json b/packages/atxp-redis/package.json index 7f04643..1e3fdfb 100644 --- a/packages/atxp-redis/package.json +++ b/packages/atxp-redis/package.json @@ -28,7 +28,7 @@ "typecheck": "tsc --noEmit", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "test": "vitest run", + "test": "vitest run --fileParallelism=false", "test:integration": "vitest run src/redisOAuthDb.integration.test.ts --reporter=verbose", "prepack": "npm run build && npm run typecheck", "pack:dry": "npm pack --dry-run" diff --git a/packages/atxp-server/package.json b/packages/atxp-server/package.json index c66c6c4..2027ee2 100644 --- a/packages/atxp-server/package.json +++ b/packages/atxp-server/package.json @@ -33,7 +33,7 @@ "typecheck": "tsc --noEmit", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "test": "vitest run", + "test": "vitest run --fileParallelism=false", "prepack": "npm run build && npm run typecheck && rm -rf dist/node_modules dist/_virtual", "pack:dry": "npm pack --dry-run" }, diff --git a/packages/atxp-solana/package.json b/packages/atxp-solana/package.json index e7baea9..21587be 100644 --- a/packages/atxp-solana/package.json +++ b/packages/atxp-solana/package.json @@ -28,7 +28,7 @@ "typecheck": "tsc --noEmit", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "test": "vitest run", + "test": "vitest run --fileParallelism=false", "prepack": "npm run build && npm run typecheck", "pack:dry": "npm pack --dry-run" }, diff --git a/packages/atxp-sqlite/package.json b/packages/atxp-sqlite/package.json index 67bc99d..766abae 100644 --- a/packages/atxp-sqlite/package.json +++ b/packages/atxp-sqlite/package.json @@ -28,7 +28,7 @@ "typecheck": "tsc --noEmit", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "test": "vitest run", + "test": "vitest run --fileParallelism=false", "test:integration": "vitest run src/sqlite.integration.test.ts --reporter=verbose", "prepack": "npm run build && npm run typecheck", "pack:dry": "npm pack --dry-run" diff --git a/packages/atxp-tempo/package.json b/packages/atxp-tempo/package.json index af106fc..e4717cd 100644 --- a/packages/atxp-tempo/package.json +++ b/packages/atxp-tempo/package.json @@ -28,7 +28,7 @@ "typecheck": "tsc --noEmit", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "test": "vitest run", + "test": "vitest run --fileParallelism=false", "prepack": "npm run build && npm run typecheck", "pack:dry": "npm pack --dry-run" }, diff --git a/packages/atxp-worldchain/package.json b/packages/atxp-worldchain/package.json index d3119bf..0ac5357 100644 --- a/packages/atxp-worldchain/package.json +++ b/packages/atxp-worldchain/package.json @@ -28,7 +28,7 @@ "typecheck": "tsc --noEmit", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "test": "vitest run", + "test": "vitest run --fileParallelism=false", "prepack": "npm run build && npm run typecheck", "pack:dry": "npm pack --dry-run" }, diff --git a/packages/atxp-x402/package.json b/packages/atxp-x402/package.json index 4f46b3c..d1294ea 100644 --- a/packages/atxp-x402/package.json +++ b/packages/atxp-x402/package.json @@ -28,7 +28,7 @@ "typecheck": "tsc --noEmit", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "test": "vitest run", + "test": "vitest run --fileParallelism=false", "prepack": "npm run build && npm run typecheck && rm -rf dist/node_modules dist/_virtual", "pack:dry": "npm pack --dry-run" }, From 3bd329d41c76c1deabce19afbd5746bf61e42104 Mon Sep 17 00:00:00 2001 From: R-M-Naveen Date: Thu, 28 May 2026 17:42:56 -0500 Subject: [PATCH 2/2] test: isolate express fetch stubs --- packages/atxp-base/package.json | 2 +- packages/atxp-client/package.json | 2 +- packages/atxp-cloudflare/package.json | 2 +- packages/atxp-common/package.json | 2 +- packages/atxp-express/package.json | 2 +- packages/atxp-express/src/omniChallenge.test.ts | 8 ++++++-- packages/atxp-mpp/package.json | 2 +- packages/atxp-polygon/package.json | 2 +- packages/atxp-redis/package.json | 2 +- packages/atxp-server/package.json | 2 +- packages/atxp-solana/package.json | 2 +- packages/atxp-sqlite/package.json | 2 +- packages/atxp-tempo/package.json | 2 +- packages/atxp-worldchain/package.json | 2 +- packages/atxp-x402/package.json | 2 +- 15 files changed, 20 insertions(+), 16 deletions(-) diff --git a/packages/atxp-base/package.json b/packages/atxp-base/package.json index 637d8c1..3107baa 100644 --- a/packages/atxp-base/package.json +++ b/packages/atxp-base/package.json @@ -28,7 +28,7 @@ "typecheck": "tsc --noEmit", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "test": "vitest run --fileParallelism=false", + "test": "vitest run", "prepack": "npm run build && npm run typecheck", "pack:dry": "npm pack --dry-run" }, diff --git a/packages/atxp-client/package.json b/packages/atxp-client/package.json index e848675..0f80553 100644 --- a/packages/atxp-client/package.json +++ b/packages/atxp-client/package.json @@ -28,7 +28,7 @@ "typecheck": "tsc --noEmit", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "test": "vitest run --fileParallelism=false", + "test": "vitest run", "prepack": "npm run build && npm run typecheck", "pack:dry": "npm pack --dry-run" }, diff --git a/packages/atxp-cloudflare/package.json b/packages/atxp-cloudflare/package.json index aed6ce5..b6536f6 100644 --- a/packages/atxp-cloudflare/package.json +++ b/packages/atxp-cloudflare/package.json @@ -28,7 +28,7 @@ "typecheck": "tsc --noEmit", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "test": "vitest run --fileParallelism=false", + "test": "vitest run", "prepack": "npm run build && npm run typecheck", "pack:dry": "npm pack --dry-run" }, diff --git a/packages/atxp-common/package.json b/packages/atxp-common/package.json index 277d477..cfdec39 100644 --- a/packages/atxp-common/package.json +++ b/packages/atxp-common/package.json @@ -38,7 +38,7 @@ "typecheck": "tsc --noEmit", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "test": "vitest run --fileParallelism=false", + "test": "vitest run", "test:integration": "vitest run --testTimeout=120000 src/**/*.integration.test.ts", "test:package-managers": "vitest run --testTimeout=120000 src/platform/packageManager.integration.test.ts", "prepack": "npm run build && npm run typecheck", diff --git a/packages/atxp-express/package.json b/packages/atxp-express/package.json index b29e08d..ff9d29b 100644 --- a/packages/atxp-express/package.json +++ b/packages/atxp-express/package.json @@ -28,7 +28,7 @@ "typecheck": "tsc --noEmit", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "test": "vitest run --fileParallelism=false", + "test": "vitest run", "prepack": "npm run build && npm run typecheck", "pack:dry": "npm pack --dry-run" }, diff --git a/packages/atxp-express/src/omniChallenge.test.ts b/packages/atxp-express/src/omniChallenge.test.ts index a247f71..fcf3318 100644 --- a/packages/atxp-express/src/omniChallenge.test.ts +++ b/packages/atxp-express/src/omniChallenge.test.ts @@ -1,4 +1,4 @@ -import { describe, it, expect, vi, beforeEach } from 'vitest'; +import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; import { atxpExpress } from './atxpExpress.js'; import * as TH from '@atxp/server/serverTestHelpers'; import { getDetectedCredential, type DetectedCredential } from '@atxp/server'; @@ -7,12 +7,16 @@ import request from 'supertest'; // Mock global fetch — middleware no longer calls settle, so fetch should not be called const mockFetch = vi.fn(); -vi.stubGlobal('fetch', mockFetch); describe('credential detection Express middleware', () => { beforeEach(() => { mockFetch.mockReset(); + vi.stubGlobal('fetch', mockFetch); + }); + + afterEach(() => { + vi.unstubAllGlobals(); }); describe('credential detected → stored in context, handler proceeds', () => { diff --git a/packages/atxp-mpp/package.json b/packages/atxp-mpp/package.json index 928d85a..ba62d2f 100644 --- a/packages/atxp-mpp/package.json +++ b/packages/atxp-mpp/package.json @@ -28,7 +28,7 @@ "typecheck": "tsc --noEmit", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "test": "vitest run --fileParallelism=false", + "test": "vitest run", "prepack": "npm run build && npm run typecheck", "pack:dry": "npm pack --dry-run" }, diff --git a/packages/atxp-polygon/package.json b/packages/atxp-polygon/package.json index 12f24e7..d2e9830 100644 --- a/packages/atxp-polygon/package.json +++ b/packages/atxp-polygon/package.json @@ -28,7 +28,7 @@ "typecheck": "tsc --noEmit", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "test": "vitest run --fileParallelism=false", + "test": "vitest run", "test:browser": "npm run build && npm run serve:test", "serve:test": "npx -y http-server -p 8000 -c-1 --cors", "prepack": "npm run build && npm run typecheck", diff --git a/packages/atxp-redis/package.json b/packages/atxp-redis/package.json index 1e3fdfb..7f04643 100644 --- a/packages/atxp-redis/package.json +++ b/packages/atxp-redis/package.json @@ -28,7 +28,7 @@ "typecheck": "tsc --noEmit", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "test": "vitest run --fileParallelism=false", + "test": "vitest run", "test:integration": "vitest run src/redisOAuthDb.integration.test.ts --reporter=verbose", "prepack": "npm run build && npm run typecheck", "pack:dry": "npm pack --dry-run" diff --git a/packages/atxp-server/package.json b/packages/atxp-server/package.json index 2027ee2..c66c6c4 100644 --- a/packages/atxp-server/package.json +++ b/packages/atxp-server/package.json @@ -33,7 +33,7 @@ "typecheck": "tsc --noEmit", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "test": "vitest run --fileParallelism=false", + "test": "vitest run", "prepack": "npm run build && npm run typecheck && rm -rf dist/node_modules dist/_virtual", "pack:dry": "npm pack --dry-run" }, diff --git a/packages/atxp-solana/package.json b/packages/atxp-solana/package.json index 21587be..e7baea9 100644 --- a/packages/atxp-solana/package.json +++ b/packages/atxp-solana/package.json @@ -28,7 +28,7 @@ "typecheck": "tsc --noEmit", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "test": "vitest run --fileParallelism=false", + "test": "vitest run", "prepack": "npm run build && npm run typecheck", "pack:dry": "npm pack --dry-run" }, diff --git a/packages/atxp-sqlite/package.json b/packages/atxp-sqlite/package.json index 766abae..67bc99d 100644 --- a/packages/atxp-sqlite/package.json +++ b/packages/atxp-sqlite/package.json @@ -28,7 +28,7 @@ "typecheck": "tsc --noEmit", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "test": "vitest run --fileParallelism=false", + "test": "vitest run", "test:integration": "vitest run src/sqlite.integration.test.ts --reporter=verbose", "prepack": "npm run build && npm run typecheck", "pack:dry": "npm pack --dry-run" diff --git a/packages/atxp-tempo/package.json b/packages/atxp-tempo/package.json index e4717cd..af106fc 100644 --- a/packages/atxp-tempo/package.json +++ b/packages/atxp-tempo/package.json @@ -28,7 +28,7 @@ "typecheck": "tsc --noEmit", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "test": "vitest run --fileParallelism=false", + "test": "vitest run", "prepack": "npm run build && npm run typecheck", "pack:dry": "npm pack --dry-run" }, diff --git a/packages/atxp-worldchain/package.json b/packages/atxp-worldchain/package.json index 0ac5357..d3119bf 100644 --- a/packages/atxp-worldchain/package.json +++ b/packages/atxp-worldchain/package.json @@ -28,7 +28,7 @@ "typecheck": "tsc --noEmit", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "test": "vitest run --fileParallelism=false", + "test": "vitest run", "prepack": "npm run build && npm run typecheck", "pack:dry": "npm pack --dry-run" }, diff --git a/packages/atxp-x402/package.json b/packages/atxp-x402/package.json index d1294ea..4f46b3c 100644 --- a/packages/atxp-x402/package.json +++ b/packages/atxp-x402/package.json @@ -28,7 +28,7 @@ "typecheck": "tsc --noEmit", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", - "test": "vitest run --fileParallelism=false", + "test": "vitest run", "prepack": "npm run build && npm run typecheck && rm -rf dist/node_modules dist/_virtual", "pack:dry": "npm pack --dry-run" },