Skip to content

Scripts to ease TDD : watch for files changes and run tests.

Notifications You must be signed in to change notification settings

chapuyj/live-testing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

live-testing

Scripts to ease TDD : watch for files changes and run tests.

Bash version

Usage

Put live-testing.sh at the root of your project, and then edit file to specify how to run unit tests.

At least, you have to edit the runTests() function by adding a command to run unit tests on our project.

runTests() {
  # TODO >>> RUN YOUR TESTS HERE
}

You can also configure the main part, by changing the watched folder or the timer.

### Main

folder='.'
everySeconds='2'

watch $folder $everySeconds

Possible improvements

  • Watching for file date changes and sleeping with the same amount of time can lead to some misses.
  • Debounce / Throttle execution of tests if there are changes.
  • Add a configuration file or parsing arguments for timer, watched folder, unit test command.

About

Scripts to ease TDD : watch for files changes and run tests.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages