alsatian icon indicating copy to clipboard operation
alsatian copied to clipboard

Add watch option

Open Jameskmonger opened this issue 9 years ago • 2 comments

The Problem

Having Alsatian watch for changes and then re-run the test currently requires the user to configure gulp or something similar to do that.

It would be good to have this behaviour out of the box.

Proposed Solution

alsatian --watch "./test/*.test.js"

Run all test files matching ./test/*.test.js and re-run them when changes are detected.

A change to ./test/a.test.js should result in those tests being run only - not all tests.

Considerations

If Alsatian is run from an npm script like tsc && alsatian ... - how would the files get compiled if --watch is added. Would this be the IDEs responsibility? - feels shaky

If ./test/a.test.js and ./test/b.test.js both rely on ./src/some-util.js, how will Alsatian react to a change in some-util?

Jameskmonger avatar Apr 21 '17 10:04 Jameskmonger

cc @davidgruar

Jameskmonger avatar Apr 21 '17 10:04 Jameskmonger

Yep @jameskmonger sounds great but need to have a bug scoping and design session for this one :)

jamesadarich avatar Apr 22 '17 10:04 jamesadarich