diff --git a/.vscode/tasks.json b/.vscode/tasks.json index a8754a8..6b2f4cb 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -31,6 +31,16 @@ "problemMatcher": [], "label": "npm: test", "detail": "pta tests/*.mjs" + }, + { + "type": "npm", + "script": "test:watch", + "group": "test", + "problemMatcher": [], + "label": "npm: test:watch", + // https://crates.io/crates/watchexec-cli + "detail": "watchexec --filter \"tests/*.res\" \"npx pta tests/*.mjs\"", + "isBackground": true } ] } diff --git a/package.json b/package.json index ed57ed2..34b5062 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "res:clean": "rescript clean", "res:dev": "rescript -w", "test": "pta tests/*.mjs", + "test:watch": "watchexec --filter \"tests/*.res\" \"npx pta tests/*.mjs\"", "format": "rescript format -all", "package": "esbuild src/Index.res.mjs --outfile=dist/index.js --bundle --platform=node --target=node20", "all": "npm run res:build && npm run test && npm run format && npm run package"