Run tests only on file save

  02 Oct 2019   2 min read

Today we are happy to announce the release of a new feature that allows Wallaby users to control when tests are run. Before today, Wallaby would detect both saved and unsaved changes to code and test files and schedule an incremental test run of affected tests. Wallaby now provides the ability to only run when a file is saved; Wallaby will still only run the minimal set of tests based on your code changes but now waits until a file is saved.


You may switch between running tests on any change or only on file save after starting Wallaby by using your editor commands. Please refer to our editor-specific docs on how to change the run mode (VS Code, JetBrains, Visual Studio, Atom, Sublime).

In addition to using the editor commands after Wallaby starts, you may specific the default mode that Wallaby initially uses after starting. The new runMode configuration file setting provides two options, automatic and onsave. The default mode is automatic.

If you are using Wallaby’s automatic configuration feature, you may not have a Wallaby configuration file. In this case, you may configure the setting in your package.json file under the “wallaby” node.

While test runs are triggered by file save events, Wallaby will use changes made to other files that may not yet be saved to disk to ensure consistency across your entire project.

Please note: you may need to change your editor settings to not save files automatically in order to use this feature.


Thanks for reading! As usual, we would love to hear your feedback on Twitter, or via our GitHub repo.

Happy Testing!