n8n/packages/@n8n/computer-use/vite.config.ts
Matsu 5feafdfafd
test: Migrate @n8n/computer-use from Jest to Vitest (#31482)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 13:42:19 +00:00

24 lines
626 B
TypeScript

import path from 'node:path';
import { mergeConfig } from 'vite';
import { createVitestConfig } from '@n8n/vitest-config/node';
export default mergeConfig(
createVitestConfig({
// The n8n root jest.config sets `restoreMocks: true`, and tests rely on it.
restoreMocks: true,
}),
{
resolve: {
alias: [
// @inquirer/prompts and its sub-packages are ESM-only. Tests redirect
// any @inquirer/* import to this mock (mirrors the former Jest
// moduleNameMapper).
{
find: /^@inquirer\/.*$/,
replacement: path.resolve(__dirname, './src/__mocks__/@inquirer/prompts.ts'),
},
],
},
},
);