diff options
| author | Tommaso Sciortino <[email protected]> | 2025-08-12 15:57:27 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-08-12 22:57:27 +0000 |
| commit | 9d023be1d16a6bf7427569f863e6cfd2c3442d8b (patch) | |
| tree | b983227f56fd9f26008b475061a345b61207c970 /integration-tests/simple-mcp-server.test.ts | |
| parent | 8d6eb8c322890b5cdf20d4a30dd17afb1541f5aa (diff) | |
Upgrade integration tests to use Vitest (#6021)
Diffstat (limited to 'integration-tests/simple-mcp-server.test.ts')
| -rw-r--r-- | integration-tests/simple-mcp-server.test.ts | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/integration-tests/simple-mcp-server.test.ts b/integration-tests/simple-mcp-server.test.ts index c4191078..98c81f16 100644 --- a/integration-tests/simple-mcp-server.test.ts +++ b/integration-tests/simple-mcp-server.test.ts @@ -10,8 +10,7 @@ * external dependencies, making it compatible with Docker sandbox mode. */ -import { test, describe, before } from 'node:test'; -import { strict as assert } from 'node:assert'; +import { describe, it, beforeAll, expect } from 'vitest'; import { TestRig, validateModelOutput } from './test-helper.js'; import { join } from 'path'; import { writeFileSync } from 'fs'; @@ -168,7 +167,7 @@ rpc.send({ describe('simple-mcp-server', () => { const rig = new TestRig(); - before(async () => { + beforeAll(async () => { // Setup test directory with MCP server configuration await rig.setup('simple-mcp-server', { settings: { @@ -192,17 +191,20 @@ describe('simple-mcp-server', () => { } }); - test('should add two numbers', async () => { + it('should add two numbers', async () => { // Test directory is already set up in before hook // Just run the command - MCP server config is in settings.json const output = await rig.run('add 5 and 10'); const foundToolCall = await rig.waitForToolCall('add'); - assert.ok(foundToolCall, 'Expected to find an add tool call'); + expect(foundToolCall, 'Expected to find an add tool call').toBeTruthy(); // Validate model output - will throw if no output, fail if missing expected content validateModelOutput(output, '15', 'MCP server test'); - assert.ok(output.includes('15'), 'Expected output to contain the sum (15)'); + expect( + output.includes('15'), + 'Expected output to contain the sum (15)', + ).toBeTruthy(); }); }); |
