Skip to content

Commit

Permalink
Set up file watching for test execution using watchexec-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
brettcannon committed May 11, 2024
1 parent 907c633 commit b50ba13
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
]
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit b50ba13

Please sign in to comment.