I use the following in Bash.
function notifyme() {
MSG=${1:-'Terminal is done'}
TITLE=${2:-"Done!"}
osascript -e "display notification \"${MSG}\" with title \"${TITLE}\""
}
I use it like:bin/start-unit-tests; notifyme