Skip to content

Instantly share code, notes, and snippets.

@kristoferjoseph
Last active May 4, 2022
Embed
What would you like to do?
deno file watcher test runner
import { exec } from "https://deno.land/x/exec/mod.ts";
const watcher = Deno.watchFs("./");
for await (const event of watcher) {
// if you're curious
// let kind = event.kind
// console.log('EVENT KIND: ', kind)
await exec('clear')
await exec('deno test --allow-read')
}
@kristoferjoseph
Copy link
Author

kristoferjoseph commented Jun 11, 2020

run with:
deno run --allow-run --allow-read watch.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment