Merge branch 'master' of https://github.com/pjstadig/humane-test-output into clojurescript_support

# Conflicts:
#	project.clj
#	test/pjstadig/humane_test_output/formatting_test.cljc
This commit is contained in:
Miloslav Nenadal 2016-02-24 21:53:15 +01:00
commit 49bdadd816
6 changed files with 46 additions and 39 deletions

View file

@ -4,6 +4,9 @@
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:deploy-repositories [["releases" :clojars]]
:test-selectors
{:default (complement :intentionally-failing)
:yes-i-know-the-tests-are-supposed-to-fail :intentionally-failing}
:profiles {:dev {:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.7.228"]
[org.seleniumhq.selenium/selenium-java "2.52.0"]

View file

@ -1,12 +1,10 @@
lein test pjstadig.fixtures.macro
lein test pjstadig.humane-test-output.formatting-test
lein test :only pjstadig.humane-test-output.formatting-test/t-formatting
FAIL in (t-formatting) (formatting_test.cljc:9)
FIXME, I fail.
FAIL in (t-formatting) (formatting_test.cljc:12)
THESE TESTS ARE INTENDED TO FAIL
expected: {:foo :bar,
:baz :quux,
:something "a long string?",
@ -20,8 +18,8 @@ expected: {:foo :bar,
lein test :only pjstadig.humane-test-output.formatting-test/t-formatting
FAIL in (t-formatting) (formatting_test.cljc:12)
FIXME, I fail.
FAIL in (t-formatting) (formatting_test.cljc:15)
THESE TESTS ARE INTENDED TO FAIL
expected: {:foo :bar,
:baz :quux,
:something "a long string?",
@ -33,8 +31,8 @@ expected: {:foo :bar,
lein test :only pjstadig.humane-test-output.formatting-test/t-formatting
FAIL in (t-formatting) (formatting_test.cljc:15)
FIXME, I fail.
FAIL in (t-formatting) (formatting_test.cljc:18)
THESE TESTS ARE INTENDED TO FAIL
expected: {:foo :bar}
actual: {:foo :bar,
:baz :quux,
@ -46,8 +44,8 @@ expected: {:foo :bar}
lein test :only pjstadig.humane-test-output.formatting-test/t-formatting
FAIL in (t-formatting) (formatting_test.cljc:18)
FIXME, I fail.
FAIL in (t-formatting) (formatting_test.cljc:21)
THESE TESTS ARE INTENDED TO FAIL
expected: {:foo :bar, :baz :quux}
actual: {:foo :bar, :baz :quux}
diff: + expected: {:foo :bar, :baz :quux}
@ -61,8 +59,8 @@ expected: {:foo :bar, :baz :quux}
lein test :only pjstadig.humane-test-output.formatting-test/t-formatting
FAIL in (t-formatting) (formatting_test.cljc:22)
FIXME, I fail.
FAIL in (t-formatting) (formatting_test.cljc:25)
THESE TESTS ARE INTENDED TO FAIL
expected: (list? foo)
actual: (not
(list?
@ -73,7 +71,8 @@ expected: (list? foo)
lein test :only pjstadig.humane-test-output.formatting-test/t-macro-wrapping
FAIL in (t-macro-wrapping) (formatting_test.cljc:24)
FAIL in (t-macro-wrapping) (formatting_test.cljc:27)
THIS ONE SHOULD ALSO FAIL
expected: 1
actual: 2
diff: - 1
@ -83,8 +82,8 @@ lein test pjstadig.humane-test-output.records-test
lein test :only pjstadig.humane-test-output.records-test/t-records
FAIL in (t-records) (records_test.cljc:10)
these should not print as plain maps
FAIL in (t-records) (records_test.cljc:11)
THESE TESTS ARE INTENDED TO FAIL these should not print as plain maps
expected: #pjstadig.humane_test_output.records_test.ARecord{:foo :foo}
actual: #pjstadig.humane_test_output.records_test.ARecord{:foo :bar}
diff: - {:foo :foo}
@ -92,15 +91,15 @@ expected: #pjstadig.humane_test_output.records_test.ARecord{:foo :foo}
lein test :only pjstadig.humane-test-output.records-test/t-records
FAIL in (t-records) (records_test.cljc:12)
there should be a diff here
FAIL in (t-records) (records_test.cljc:13)
THESE TESTS ARE INTENDED TO FAIL there should be a diff here
expected: #pjstadig.humane_test_output.records_test.ARecord{:foo :foo}
actual: {:foo :foo}
lein test :only pjstadig.humane-test-output.records-test/t-records
FAIL in (t-records) (records_test.cljc:14)
and here
FAIL in (t-records) (records_test.cljc:15)
THESE TESTS ARE INTENDED TO FAIL and here
expected: #pjstadig.humane_test_output.records_test.ARecord{:foo :foo}
actual: #pjstadig.humane_test_output.records_test.BRecord{:foo :foo}

View file

@ -4,7 +4,7 @@ Running ClojureScript test: test
Testing pjstadig.humane-test-output.formatting-test
FAIL in (t-formatting) (:)
FIXME, I fail.
THESE TESTS ARE INTENDED TO FAIL
expected:
{:foo :bar,
:baz :quux,
@ -26,7 +26,7 @@ expected:
FAIL in (t-formatting) (:)
FIXME, I fail.
THESE TESTS ARE INTENDED TO FAIL
expected:
{:foo :bar,
:baz :quux,
@ -45,7 +45,7 @@ expected:
+
FAIL in (t-formatting) (:)
FIXME, I fail.
THESE TESTS ARE INTENDED TO FAIL
expected:
{:foo :bar}
@ -63,7 +63,7 @@ expected:
FAIL in (t-formatting) (:)
FIXME, I fail.
THESE TESTS ARE INTENDED TO FAIL
expected:
{:foo :bar, :baz :quux}
@ -100,7 +100,7 @@ expected:
FAIL in (t-formatting) (:)
FIXME, I fail.
THESE TESTS ARE INTENDED TO FAIL
expected:
(list? foo)
@ -115,6 +115,7 @@ expected:
FAIL in (t-macro-wrapping) (:)
THIS ONE SHOULD ALSO FAIL
expected:
(clojure.core/= 1 2)
@ -125,7 +126,7 @@ expected:
Testing pjstadig.humane-test-output.records-test
FAIL in (t-records) (:)
these should not print as plain maps
THESE TESTS ARE INTENDED TO FAIL these should not print as plain maps
expected:
#pjstadig.humane-test-output.records-test.ARecord{:foo:foo}
@ -143,7 +144,7 @@ expected:
FAIL in (t-records) (:)
there should be a diff here
THESE TESTS ARE INTENDED TO FAIL there should be a diff here
expected:
#pjstadig.humane-test-output.records-test.ARecord{:foo:foo}
@ -155,7 +156,7 @@ expected:
+
FAIL in (t-records) (:)
and here
THESE TESTS ARE INTENDED TO FAIL and here
expected:
#pjstadig.humane-test-output.records-test.ARecord{:foo:foo}
@ -167,5 +168,5 @@ expected:
diff:
+
Ran 3 tests containing 9 assertions.
Ran 4 tests containing 10 assertions.
9 failures, 0 errors.

View file

@ -3,5 +3,5 @@
(defmacro deftest+
[test-name expected actual]
`(~'deftest ~test-name
(~'is (= ~expected ~actual))))
(~'is (= ~expected ~actual) "THIS ONE SHOULD ALSO FAIL")))

View file

@ -4,8 +4,11 @@
:cljs (:require-macros [cljs.test :refer [deftest testing is]]
[pjstadig.fixtures.macro :refer [deftest+]])))
(deftest t-formatting
(testing "FIXME, I fail."
(deftest t-nothing-to-see-here
(is true "everything should be A-OK"))
(deftest ^:intentionally-failing t-formatting
(testing "THESE TESTS ARE INTENDED TO FAIL"
(is (= {:foo :bar :baz :quux :something "a long string?"
:another-key "and another value"}
{:fo :bar}))
@ -21,4 +24,4 @@
:another-key "and another value"}]
(is (list? foo)))))
(deftest+ t-macro-wrapping 1 2)
(deftest+ ^:intentionally-failing t-macro-wrapping 1 2)

View file

@ -5,10 +5,11 @@
(defrecord ARecord [foo])
(defrecord BRecord [foo])
(deftest t-records
(deftest ^:intentionally-failing t-records
(testing "THESE TESTS ARE INTENDED TO FAIL"
(testing "these should not print as plain maps"
(is (= (->ARecord :foo) (->ARecord :bar))))
(testing "there should be a diff here"
(is (= (->ARecord :foo) {:foo :foo})))
(testing "and here"
(is (= (->ARecord :foo) (->BRecord :foo)))))
(is (= (->ARecord :foo) (->BRecord :foo))))))