diff --git a/test/clojure/core_test/nth.cljc b/test/clojure/core_test/nth.cljc index 38c5fd0..9941554 100644 --- a/test/clojure/core_test/nth.cljc +++ b/test/clojure/core_test/nth.cljc @@ -16,4 +16,10 @@ (is (thrown? #?(:cljs :default, :clj Exception) (nth [0 1 2] -1))) (is (thrown? #?(:cljs :default, :clj Exception) (nth [0 1 2] 10))) (is (thrown? #?(:cljs :default, :clj Exception) (nth [0 1 2] nil))) - (is (thrown? #?(:cljs :default, :clj Exception) (nth nil nil))))) + (is (thrown? #?(:cljs :default, :clj Exception) (nth nil nil))) + + ;; `nth` accepts a default argument + (is (= :default (nth nil 0 :default))) + (is (= :default (nth [0] 1 :default))) + (is (= :default (nth [0 1] 2 :default))) + (is (= :default (nth [0 1] -1 :default)))))