mirror of
https://github.com/spartan-ng/spartan.git
synced 2026-09-22 16:41:38 +08:00
1b743f8019
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.
64 lines
1.3 KiB
JSON
64 lines
1.3 KiB
JSON
{
|
|
"name": "cli",
|
|
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
|
"sourceRoot": "libs/cli/src",
|
|
"projectType": "library",
|
|
"tags": ["scope:cli"],
|
|
"targets": {
|
|
"build": {
|
|
"executor": "@nx/js:tsc",
|
|
"outputs": ["{options.outputPath}"],
|
|
"options": {
|
|
"outputPath": "dist/libs/cli",
|
|
"main": "libs/cli/src/index.ts",
|
|
"tsConfig": "libs/cli/tsconfig.lib.json",
|
|
"assets": [
|
|
{
|
|
"input": "libs/registry/src/styles",
|
|
"glob": "**/!(*.ts)",
|
|
"output": "./src/generators/ui"
|
|
},
|
|
"libs/cli/*.md",
|
|
{
|
|
"input": "./libs/cli/src",
|
|
"glob": "**/!(*.ts)",
|
|
"output": "./src"
|
|
},
|
|
{
|
|
"input": "./libs/cli/src",
|
|
"glob": "**/*.d.ts",
|
|
"output": "./src"
|
|
},
|
|
{
|
|
"input": "./libs/cli",
|
|
"glob": "generators.json",
|
|
"output": "."
|
|
},
|
|
{
|
|
"input": "./libs/cli",
|
|
"glob": "executors.json",
|
|
"output": "."
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"lint": {
|
|
"executor": "@nx/eslint:lint",
|
|
"outputs": ["{options.outputFile}"]
|
|
},
|
|
"test": {
|
|
"executor": "@nx/vitest:test",
|
|
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
|
"options": {
|
|
"configFile": "libs/cli/vite.config.mts"
|
|
}
|
|
},
|
|
"release": {
|
|
"executor": "@spartan-ng/tools:build-update-publish",
|
|
"options": {
|
|
"libName": "cli"
|
|
}
|
|
}
|
|
}
|
|
}
|