Rename main test file to test_plugin.zunit
This commit is contained in:
parent
e25849a979
commit
7b6d59479a
2 changed files with 1 additions and 2 deletions
28
tests/test_plugin.zunit
Normal file
28
tests/test_plugin.zunit
Normal file
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env zunit
|
||||
|
||||
@setup {
|
||||
load "../auto-notify.plugin.zsh"
|
||||
}
|
||||
|
||||
@test 'version exported' {
|
||||
git_version="$(git tag --list | sort -V | tail -1)"
|
||||
git tag --list
|
||||
|
||||
assert "$AUTO_NOTIFY_VERSION" is_not_empty
|
||||
assert "$AUTO_NOTIFY_VERSION" same_as "$git_version"
|
||||
}
|
||||
|
||||
@test 'hook functions are loaded by default' {
|
||||
assert '_auto_notify_track' in $preexec_functions
|
||||
assert '_auto_notify_send' in $precmd_functions
|
||||
}
|
||||
|
||||
@test 'enable/disable auto-notify' {
|
||||
disable_auto_notify
|
||||
assert '_auto_notify_track' not_in $preexec_functions
|
||||
assert '_auto_notify_send' not_in $precmd_functions
|
||||
|
||||
enable_auto_notify
|
||||
assert '_auto_notify_track' in $preexec_functions
|
||||
assert '_auto_notify_send' in $precmd_functions
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue