Skip to content

Commit

Permalink
Add a watching task that runs builds and then tests
Browse files Browse the repository at this point in the history
That should avoid running tests when there's a compiler failure.
  • Loading branch information
brettcannon committed May 11, 2024
1 parent b50ba13 commit 98cb863
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
{
"type": "npm",
"script": "test",
"dependsOn": "npm: res:build",
"group": {
"kind": "test",
"isDefault": true
Expand All @@ -39,8 +40,15 @@
"problemMatcher": [],
"label": "npm: test:watch",
// https://crates.io/crates/watchexec-cli
"detail": "watchexec --filter \"tests/*.res\" \"npx pta tests/*.mjs\"",
"detail": "watchexec --watch tests \"npx pta tests/*.mjs\"",
"isBackground": true
},
{
"label": "all:watch",
"isBackground": true,
"group": "build",
"type": "shell",
"command": "watchexec --exts res \"npx rescript build && npx pta tests/*.mjs\""
}
]
}

0 comments on commit 98cb863

Please sign in to comment.