pyrmont / testament

A testing library for Janet
MIT License
28 stars 8 forks source link

Assert-matches succeeds when it should fail #7

Closed yumaikas closed 3 years ago

yumaikas commented 3 years ago

So, assert-match doesn't actually work to fail matches.

Both tests below should fail, but pass instead.

(use testament)

# This is the 22nd of January, 2008, a Tuesday
(def mydate (os/mktime { :year 2008 :month 0 :month-day 21 } true))

(deftest can-assert-matches 
  (assert-matches { :year 2008 :month 0 :day 21 } mydate))

(deftest parse-ymdstr-parses
  (assert-matches { :year 2012 :month 3 :day 0 } nil))
yumaikas commented 3 years ago

I forgot to add (run-tests!) to this.