tcmts.cli.test.e2e.watch
- setUp () => { dir: string; tcm: (...args: string[]) => string; scratch: (file: string, text: string) => v…
- A new codebase, and a way to run tcm in it (failing the test if it fails, except for check).
- testWatchResultsCachedByHash () => void
- Watch results are cached by hash; --fresh re-runs; a changed dependency re-evaluates. One whose code reaches outside (randomness, the clock) isn't cached: it's evaluated every time.
- testWatcherSaysImportsWithoutWritingThem () => Promise<void>
- The watcher says what a file uses and doesn't import, and leaves the file as it is: it's open in an editor, being written (`tcm check` and saving write the imports).
- testWatcherSeesChangesMadeElsewhere () => Promise<void>
- The watcher re-checks incrementally and sees codebase changes made elsewhere.
- waitFor (cond: () => boolean, ms?: number) => Promise<void>