Liking cljdoc? Tell your friends :D

No assertion warnings. Naw!

Clojars Project cljdoc badge

Library for checking absence of assertions in clojure.test tests.

Usage

Require naw.core in your test namespace(s).

Note that in a-test no assertions are made, but another-test has one assertion. So we expect a warning only about a-test.

(ns foo.core-test
  (:require [clojure.test :refer [deftest testing is]]
            [naw.core]))

(deftest a-test
  (testing "..."
    1))

(deftest another-test
  (testing (is 1)))

When executing the tests, the following warning will get printed to *err*:

WARNING: no assertions made in test a-test

Notes

  • Although this library is .cljc, the ClojureScript version doesn't work yet. Please send help.
  • This library is small and unlicensed. Do what you want with it. You can just copy paste the code from naw.core into your project and don't depend on this via Clojars, without any problem.

Unlicenced

Copyright © 2019 Michiel Borkent

Distributed under unlicense. See UNLICENSE.

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close