pestphp / pest-plugin-watch

The Pest Plugin Watch
https://pestphp.com
MIT License
17 stars 10 forks source link

Only tests folder re-launch the test suite #4

Closed nunomaduro closed 4 years ago

nunomaduro commented 4 years ago

While working with the plugin, if I change the app directory nothing happens.

I think folders within an Laravel application should be under watch too.

owenvoke commented 4 years ago

I think folders within an Laravel application should be under watch too.

By this do you mean all the database, resources, etc. directories? Or just app? 🤔 In https://github.com/pestphp/pest-plugin-watch/pull/10 I've set it to watch src and app. However, I guess perhaps this would be better as a configurable option.

The PHPUnit Watcher package uses a configuration file, and defaults to app, src, and tests. We could do this, or have an additional flag such as --watch-dirs. So you could do:

vendor/bin/pest --watch --watch-dirs=lib,tests

On another related note, they also include a fileMask option that allows you to specify filetypes to watch. Would it be worth us adding support for this too somehow?