Skip to content

Commit

Permalink
document :throws
Browse files Browse the repository at this point in the history
  • Loading branch information
dustingetz committed Aug 5, 2023
1 parent 7105b43 commit cabd726
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.md
Expand Up @@ -92,6 +92,9 @@ Tests are run when you send a file or form to your Clojure/Script REPL. In Cursi
(last xs) := :c
(let [] (last xs) := :c))

"exceptions"
(assert false "boom") :throws java.lang.AssertionError

(tests
"nested tests (is there a strong use case?)"
1 := 1)
Expand Down
4 changes: 2 additions & 2 deletions test/hyperfiddle/rcf/example_test.clj
Expand Up @@ -71,8 +71,8 @@

(tests
":throws"
(let [e (ex-info "" {})]
(throw e) :throws clojure.lang.ExceptionInfo))
(throw (ex-info "" {})) :throws clojure.lang.ExceptionInfo
(assert false "boom") :throws java.lang.AssertionError)

(tests
"missionary"
Expand Down

0 comments on commit cabd726

Please sign in to comment.