Back to Browse

Learning Bash Best Practices - 05 // Unit Testing in Bash with the filesystem

1.5K views
Jan 30, 2022
18:19

Second video about writing unit tests for Bash scripts. We'll see how to manipulate the file systems for our testing needs, without creating dependencies between tests. Small "mistake": the line "rm -rf testdata" should be in the tearDown function, to clean the test data after each test (and not before). Files: https://github.com/Phantas0s/mouseless-dev-youtube/blob/master/bash_best_practice/backup_05 shunit2: https://github.com/kward/shunit2 I'm using Neovim with shellcheck for static analysis. For snippets, ultisnips is my friend. πŸ“™ Building Your Mouseless Development Environment: https://themouseless.dev πŸ“‘ Learning to Play Vim: https://themouseless.dev/vim πŸ’Ž Increase your value as a developer: https://thevaluable.dev πŸ™ Github: https://github.com/Phantas0s πŸ’ Support the channel: https://github.com/sponsors/Phantas0s

Download

1 formats

Video Formats

360pmp426.8 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Learning Bash Best Practices - 05 // Unit Testing in Bash with the filesystem | NatokHD