R: Improve test runner system and vite config
Some checks are pending
Frontend CI / build (22.x) (push) Waiting to run

This commit is contained in:
Ivan 2025-03-01 22:00:55 +03:00
parent 6d5466dd75
commit 54472ef0b1
4 changed files with 27 additions and 1 deletions

8
.vscode/launch.json vendored
View File

@ -28,6 +28,14 @@
"script": "${workspaceFolder}/scripts/dev/RunTests.ps1",
"args": []
},
{
// Run end-to-end tests
"name": "Test E2E",
"type": "PowerShell",
"request": "launch",
"script": "${workspaceFolder}/scripts/dev/RunE2ETests.ps1",
"args": []
},
{
// Run Tests for backend for current file in Debug mode
"name": "BE-DebugTestFile",

View File

@ -5,7 +5,8 @@
"type": "module",
"scripts": {
"generate": "lezer-generator src/components/RSInput/rslang/rslangFast.grammar -o src/components/RSInput/rslang/parser.ts && lezer-generator src/components/RSInput/rslang/rslangAST.grammar -o src/components/RSInput/rslang/parserAST.ts && lezer-generator src/components/RefsInput/parse/refsText.grammar -o src/components/RefsInput/parse/parser.ts",
"test": "jest && playwright test",
"test": "jest",
"teste2e": "playwright test",
"dev": "vite --host",
"build": "tsc && vite build",
"lint": "eslint . --report-unused-disable-directives --max-warnings 0",

View File

@ -73,6 +73,9 @@ export default ({ mode }: { mode: string }) => {
alias: {
'@': path.resolve(__dirname, './src')
}
},
optimizeDeps: {
exclude: ['react-scan']
}
});
};

View File

@ -0,0 +1,14 @@
# Run tests
$frontend = Resolve-Path -Path "$PSScriptRoot\..\..\rsconcept\frontend"
function RunTests() {
TestFrontend
}
function TestFrontend() {
Set-Location $frontend
& npm run teste2e
}
RunTests