Skip to content

Commit

Permalink
dx: automatically launch tests at build time
Browse files Browse the repository at this point in the history
  • Loading branch information
rejetto committed Jan 24, 2025
1 parent 0e72ee5 commit 3a93e10
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@
"watch-server-proxied": "cross-env FRONTEND_PROXY=3005 ADMIN_PROXY=3006 npm run watch-server",
"start-frontend": "npm run start --workspace=frontend",
"start-admin": "npm run start --workspace=admin",
"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",
"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",
"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",
"build-frontend": "npm run build --workspace=frontend",
"build-admin": "npm run build --workspace=admin",
"server-for-test": "node dist/src --cwd . --config tests && rm custom.html",
"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",
"test": "mocha -r ts-node/register 'tests/**/*.ts'",
"test-with-server": "node dist/src --cwd . --config tests & pid=$! && mocha -r ts-node/register 'tests/**/*.ts'; mocha_exit=$?; kill $pid; exit $mocha_exit",
"pub": "cd dist && npm publish",
"dist": "npm run build-all && npm run dist-bin",
"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",
Expand Down
1 change: 1 addition & 0 deletions tests/config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
port: 81
open_browser_at_start: false
allowed_referer: x.com
vfs:
masks:
Expand Down

0 comments on commit 3a93e10

Please sign in to comment.