enso/app/gui2/vitest.config.ts
Paweł Grabarz 1096489cc8
Use ExternalId for NodeId and preserve it through argument deletions. (#10512)
Fixes #10311

Using `ExternalId` for `NodeId` allows us to match the idea of node identity with engine. That means any bugs that would cause the identity to change will be immediately visible on UI due to misplaced metadata or node being unnecessarily rerendered from scratch. This change and an addional bugfix of argument deletion handling makes the node view stable on edits and allows tabbing through arguments.

https://github.com/enso-org/enso/assets/919491/72d9ec29-54ed-4899-aac1-6678a001a21d
2024-07-12 10:45:57 +00:00

22 lines
641 B
TypeScript

import { fileURLToPath } from 'node:url'
import { configDefaults, defineConfig, mergeConfig } from 'vitest/config'
import viteConfig from './vite.config'
const config = mergeConfig(
viteConfig,
defineConfig({
test: {
environment: 'jsdom',
includeSource: ['./{src,shared,ydoc-server}/**/*.{ts,vue}'],
exclude: [...configDefaults.exclude, 'e2e/*'],
root: fileURLToPath(new URL('./', import.meta.url)),
restoreMocks: true,
},
define: {
RUNNING_VITEST: true,
},
}),
)
config.esbuild.dropLabels = config.esbuild.dropLabels.filter((label: string) => label != 'DEV')
export default config