diff --git a/js/ai/package.json b/js/ai/package.json index ef91d72ce4..3b4b4e9a99 100644 --- a/js/ai/package.json +++ b/js/ai/package.json @@ -15,7 +15,7 @@ "build:clean": "rimraf ./lib", "build": "npm-run-all build:clean check compile", "build:watch": "tsup-node --watch", - "test": "node --import tsx --test ./tests/**/*_test.ts ./tests/*_test.ts", + "test": "node --import tsx --test --test-force-exit ./tests/**/*_test.ts ./tests/*_test.ts", "test:watch": "node --watch --import tsx --test ./tests/**/*_test.ts ./tests/*_test.ts", "test:single": "node --import tsx --test" }, diff --git a/js/plugins/google-cloud/tests/metrics_test.ts b/js/plugins/google-cloud/tests/metrics_test.ts index 10ad2c18ff..451c82bba9 100644 --- a/js/plugins/google-cloud/tests/metrics_test.ts +++ b/js/plugins/google-cloud/tests/metrics_test.ts @@ -112,7 +112,7 @@ describe('GoogleCloudMetrics', () => { return explode(); }); - assert.rejects(async () => { + await assert.rejects(async () => { await testFlow(); }); @@ -242,7 +242,7 @@ describe('GoogleCloudMetrics', () => { return explode(); }); - assert.rejects(async () => { + await assert.rejects(async () => { return ai.generate({ model: testModel, prompt: 'test prompt', @@ -344,7 +344,7 @@ describe('GoogleCloudMetrics', () => { return Promise.reject(new Error('failed')); }); - assert.rejects(async () => { + await assert.rejects(async () => { await flow(); }); @@ -379,7 +379,7 @@ describe('GoogleCloudMetrics', () => { return 'done'; }); - assert.rejects(async () => { + await assert.rejects(async () => { await flow(); }); @@ -424,7 +424,7 @@ describe('GoogleCloudMetrics', () => { return 'done'; }); - assert.rejects(async () => { + await assert.rejects(async () => { await flow(); }); @@ -463,7 +463,7 @@ describe('GoogleCloudMetrics', () => { return 'done'; }); - assert.rejects(async () => { + await assert.rejects(async () => { await flow(); }); @@ -504,7 +504,7 @@ describe('GoogleCloudMetrics', () => { return 'not failing'; }); - assert.rejects(async () => { + await assert.rejects(async () => { await flow(); }); diff --git a/js/plugins/vercel-ai/package.json b/js/plugins/vercel-ai/package.json index 4ce14b2963..a0c8c6a095 100644 --- a/js/plugins/vercel-ai/package.json +++ b/js/plugins/vercel-ai/package.json @@ -62,7 +62,7 @@ "build:clean": "rimraf ./lib", "build": "npm-run-all build:clean check compile", "build:watch": "tsup-node --watch", - "test": "tsx --test ./tests/*_test.ts" + "test": "tsx --test --test-force-exit ./tests/*_test.ts" }, "peerDependencies": { "@ai-sdk/react": "^3.0.0",