tests and docs for modal helper