Files
spartan-ng__spartan/libs/cli/eslint.config.cjs
Ashley Hunter 1b743f8019 test: migrate from jest to vitest with browser testing for brain/helm
Replace Jest with Vitest across the workspace. The brain and helm Angular suites
now run in a real browser (Playwright/Chromium via Vitest browser mode) so they
exercise real layout, focus, pointer events and computed styles that jsdom could
not. The cli, tools, mcp, registry and cli-smoke suites run on Vitest's node
environment.

- Add per-project vite configs and switch test targets to @nx/vitest:test
- Convert jest APIs to vi.* and jest module mocks to vi.mock with importOriginal
- Replace jest-axe with a browser-native axe-core helper and toHaveNoViolations
- Regenerate snapshots in vitest format (content unchanged, format-only)
- Remove all jest packages, configs, the preset and the @nx/jest target default
- Install Playwright Chromium in the CI unit job for the browser suites

Also fixes a brain avatar test that asserted inside a fire-and-forget setTimeout,
which passed vacuously under jsdom and only surfaced once a real browser loaded
the image.
2026-06-13 15:16:45 +01:00

45 lines
793 B
JavaScript

const baseConfig = require('../../eslint.config.cjs');
module.exports = [
...baseConfig,
{
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
rules: {},
},
{
files: ['**/*.ts', '**/*.tsx'],
rules: {
'@angular-eslint/prefer-output-readonly': 'off',
'@angular-eslint/prefer-on-push-component-change-detection': 'off',
},
},
{
files: ['**/*.js', '**/*.jsx'],
rules: {},
},
{
files: ['**/*.json'],
rules: {
'@nx/nx-plugin-checks': 'error',
'@nx/dependency-checks': [
'error',
{
ignoredDependencies: [
'@nx/js',
'@nx/devkit',
'@nx/angular',
'@nx/vite',
'vite',
'enquirer',
'semver',
'tslib',
],
},
],
},
languageOptions: {
parser: require('jsonc-eslint-parser'),
},
},
];