mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-22 03:33:06 +08:00
refactor(editor): rename presets to integration test (#10340)
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin';
|
||||
import { defineConfig } from 'vitest/config';
|
||||
|
||||
export default defineConfig(_configEnv =>
|
||||
defineConfig({
|
||||
esbuild: { target: 'es2018' },
|
||||
optimizeDeps: {
|
||||
force: true,
|
||||
esbuildOptions: {
|
||||
// Vitest hardcodes the esbuild target to es2020,
|
||||
// override it to es2022 for top level await.
|
||||
target: 'es2022',
|
||||
},
|
||||
},
|
||||
plugins: [vanillaExtractPlugin()],
|
||||
test: {
|
||||
include: ['src/__tests__/**/*.spec.ts'],
|
||||
browser: {
|
||||
enabled: true,
|
||||
headless: process.env.CI === 'true',
|
||||
name: 'chromium',
|
||||
provider: 'playwright',
|
||||
isolate: false,
|
||||
providerOptions: {},
|
||||
viewport: {
|
||||
width: 1024,
|
||||
height: 768,
|
||||
},
|
||||
},
|
||||
coverage: {
|
||||
provider: 'istanbul', // or 'c8'
|
||||
reporter: ['lcov'],
|
||||
reportsDirectory: '../../.coverage/presets',
|
||||
},
|
||||
deps: {
|
||||
interopDefault: true,
|
||||
},
|
||||
testTransformMode: {
|
||||
web: ['src/__tests__/**/*.spec.ts'],
|
||||
},
|
||||
alias: {
|
||||
'@blocksuite/blocks': path.resolve(
|
||||
fileURLToPath(new URL('../blocks/src', import.meta.url))
|
||||
),
|
||||
'@blocksuite/blocks/*': path.resolve(
|
||||
fileURLToPath(new URL('../blocks/src/*', import.meta.url))
|
||||
),
|
||||
'@blocksuite/global/*': path.resolve(
|
||||
fileURLToPath(new URL('../framework/global/src/*', import.meta.url))
|
||||
),
|
||||
'@blocksuite/store': path.resolve(
|
||||
fileURLToPath(new URL('../framework/store/src', import.meta.url))
|
||||
),
|
||||
'@blocksuite/inline': path.resolve(
|
||||
fileURLToPath(new URL('../framework/inline/src', import.meta.url))
|
||||
),
|
||||
'@blocksuite/inline/*': path.resolve(
|
||||
fileURLToPath(new URL('../framework/inline/src/*', import.meta.url))
|
||||
),
|
||||
},
|
||||
},
|
||||
})
|
||||
);
|
||||
Reference in New Issue
Block a user