mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-07-26 11:49:16 +00:00
9b3f5c5a90
* docs: relicense Sencho to AGPLv3 and reframe Community positioning Replace BSL with AGPLv3 for the public Community product, update contributor and licensing copy for Community-focused contributions, and surface source and license links in Settings About. * docs: clarify CLA scope and Community contribution framing * fix(ui): split About link constants and harden AboutSection test selectors
32 lines
979 B
TypeScript
32 lines
979 B
TypeScript
import { defineConfig } from 'vitest/config';
|
|
import react from '@vitejs/plugin-react';
|
|
import path from 'path';
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
define: {
|
|
__APP_VERSION__: JSON.stringify('0.0.0-test'),
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
},
|
|
},
|
|
test: {
|
|
environment: 'jsdom',
|
|
// jsdom only instantiates window.localStorage / sessionStorage when the
|
|
// document has a real same-origin URL. The default about:blank origin is
|
|
// opaque and can leave both APIs undefined depending on the jsdom build,
|
|
// causing any test that touches localStorage in beforeEach to throw.
|
|
// Setting an explicit URL is the documented jsdom workaround and changes
|
|
// no test or app code.
|
|
environmentOptions: {
|
|
jsdom: { url: 'http://localhost' },
|
|
},
|
|
globals: true,
|
|
setupFiles: ['./src/__tests__/setup.ts'],
|
|
include: ['src/**/*.{test,spec}.{ts,tsx}'],
|
|
css: false,
|
|
},
|
|
});
|