Migrate to vitest from jest (#1074)

Co-authored-by: Felix Weinberger <3823880+felixweinberger@users.noreply.github.com>
Co-authored-by: Felix Weinberger <fweinberger@anthropic.com>
This commit is contained in:
Matt 2025-11-14 14:08:00 +00:00 • committed by GitHub
commit 98df118a4c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,14 +1,15 @@
import { validateToolName, validateAndWarnToolName, issueToolNameWarning } from './toolNameValidation.js';
import { vi, MockInstance } from 'vitest';
// Spy on console.warn to capture output
let warnSpy: jest.SpyInstance;
let warnSpy: MockInstance;
beforeEach(() => {
warnSpy = jest.spyOn(console, 'warn').mockImplementation();
warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {});
});
afterEach(() => {
jest.restoreAllMocks();
vi.restoreAllMocks();
});
describe('validateToolName', () => {