R: Improve test runner system and vite config
This commit is contained in:
parent
a47cebf456
commit
7dc738d87c
8
.vscode/launch.json
vendored
8
.vscode/launch.json
vendored
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -73,6 +73,9 @@ export default ({ mode }: { mode: string }) => {
|
|||
alias: {
|
||||
'@': path.resolve(__dirname, './src')
|
||||
}
|
||||
},
|
||||
optimizeDeps: {
|
||||
exclude: ['react-scan']
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
14
scripts/dev/RunE2ETests.ps1
Normal file
14
scripts/dev/RunE2ETests.ps1
Normal 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
|
Loading…
Reference in New Issue
Block a user