mirror of
https://github.com/enso-org/enso.git
synced 2024-12-21 04:51:38 +03:00
d9972d547a
Fixes #10197 # Important Notes From now on, package installation will be using `pnpm install`. Installing it globally is fine for convenience, but it can also be used as `corepack pnpm install` without having to install anything other than node. For now, all other scripts are still invoked using `npm`, so we can still invoke them with usual `--workspace` setting. As far as I can tell that doesn't really have any other side effects and is identical as running the script through `pnpm run` in respective workspace project subdirectory.
28 lines
814 B
TypeScript
28 lines
814 B
TypeScript
/** @file Configuration for vitest. */
|
|
import * as url from 'node:url'
|
|
|
|
import * as vitestConfig from 'vitest/config'
|
|
|
|
import * as appConfig from 'enso-common/src/appConfig'
|
|
|
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
|
|
appConfig.loadTestEnvironmentVariables()
|
|
// @ts-expect-error This is required, otherwise importing node modules is broken.
|
|
// This is required for `datalinkSchema.test.ts`.
|
|
process.env.NODE_ENV = 'development'
|
|
|
|
const VITE_CONFIG = (await import('./vite.config')).default
|
|
|
|
export default vitestConfig.mergeConfig(
|
|
VITE_CONFIG,
|
|
vitestConfig.defineConfig({
|
|
test: {
|
|
environment: 'jsdom',
|
|
exclude: [...vitestConfig.configDefaults.exclude, '**/*.spec.{ts,tsx}'],
|
|
root: url.fileURLToPath(new URL('./', import.meta.url)),
|
|
restoreMocks: true,
|
|
},
|
|
})
|
|
)
|