@samitouri / QOSami-HFS / commits / 3a93e10a

dx: automatically launch tests at build time

Massimo Melina committed Jan 24, 2025 at 11:29 UTC 3a93e10a34549ea01e10c27a1e82bf23e22fefeb
2 files changed +3 -1
package.json
+2 -1
@@ -12,13 +12,14 @@
12 "watch-server-proxied": "cross-env FRONTEND_PROXY=3005 ADMIN_PROXY=3006 npm run watch-server",
13 "start-frontend": "npm run start --workspace=frontend",
14 "start-admin": "npm run start --workspace=admin",
15 - "build-all": "npm audit --omit=dev --audit-level=moderate && rm -rf dist && npm i && npm run build-server && npm run build-frontend && npm run build-admin && echo COMPLETED",
15 + "build-all": "npm audit --omit=dev --audit-level=moderate && rm -rf dist && npm i && npm run build-server && npm run test-with-server && npm run build-frontend && npm run build-admin && echo COMPLETED",
16 "build-server": "rm -rf dist/src dist/plugins && tsc --target es2018 && touch package.json && cp -v -r package.json central.json README* LICENSE* hfs.ico plugins dist && find dist -name .DS_Store -o -name storage -exec rm -rf {} + && node afterbuild.js",
17 "build-frontend": "npm run build --workspace=frontend",
18 "build-admin": "npm run build --workspace=admin",
19 "server-for-test": "node dist/src --cwd . --config tests && rm custom.html",
20 "server-for-test-dev": "cross-env DEV=1 FRONTEND_PROXY=3005 ADMIN_PROXY=3006 nodemon --ignore tests/ --watch src -e ts,tsx --exec ts-node src -- --cwd . --config tests",
21 "test": "mocha -r ts-node/register 'tests/**/*.ts'",
22 + "test-with-server": "node dist/src --cwd . --config tests & pid=$! && mocha -r ts-node/register 'tests/**/*.ts'; mocha_exit=$?; kill $pid; exit $mocha_exit",
23 "pub": "cd dist && npm publish",
24 "dist": "npm run build-all && npm run dist-bin",
25 "dist-bin": "npm run dist-modules && npm run dist-bin-win && npm run dist-bin-linux && npm run dist-bin-mac && npm run dist-bin-mac-arm",
tests/config.yaml
+1
@@ -1,4 +1,5 @@
1 port: 81
2 +open_browser_at_start: false
3 allowed_referer: x.com
4 vfs:
5 masks: