brentonashworth / lein-difftest Goto Github PK
View Code? Open in Web Editor NEWLeiningen plugin for running tests with better error reporting
License: Eclipse Public License 1.0
Leiningen plugin for running tests with better error reporting
License: Eclipse Public License 1.0
expected: (= 2 21)
actual:
2
- 1
This makes you think you expected 2 and got 1, whereas the numbers are actually 2 and 21. Should probably fall back to normal clojure.test behaviour for numbers.
The demonstration Image links to a page that simply says 'not found'
In lein's project file, you have to set :hooks to actually load hooks (see lein's documentation). I can't actually seem to get difftest working at all on clojure 1.2, even with :hooks set.
Leiningen no longer generates new projects with a dependency on clojure-contrib.
If you create a new project with lein new foo
and add difftest as a dependency, it will fail because cannot find clojure-contrib.
lein-diff test should add an explicit dependency on clojure-contrib.
Hi, the following produces an error in lein difftest, but a failure in lein test.
(defrecord X [x])
(deftest record
(is (= {:category (X. 1)} {})))
The version 1.3.5 in clojars.org is incompatible with clojure 1.3.0, because color is defined without the dynamic flag. Can we have a new release with this fix which is already present in the code?
Thanks a lot!
When a test fails due to unequal maps, difftest flags a key where only the type of collection differs, not the content. This is a false positive because those collections are still equal (and if the maps are otherwise equal, the test does not fail).
Here is what I mean:
(deftest bad
(testing "oops"
(is (= {:a [1] :b 2} {:a '(1) :b 2}) "all else equal")
(is (= {:a [1] :b 2} {:a '(1) :b 3}) "all else unequal")))
and the output
FAIL in (bad) (bug.clj:100)
oops
all else unequal
expected: (= {:a [1], :b 2} {:a (quote (1)), :b 3})
actual:
{:a
- (1)
+ [1]
, :b
- 3
+ 2
}
You can see that the first test passed when considering only [1]
vs '(1)
, and the second failed due to :b
, but difftest picks up :a
as well even though Clojure does not care.
:(
I've tried using difftest 1.3.7 with Leiningen 2 (latest stable) but I get errors about vars being dynamically rebound. Trying to add 1.3.8 to my Leiningen 2 profiles file yields the following when running lein for the first time:
Could not find artifact difftest:difftest:pom:1.3.8 in central (http://repo1.maven.org/maven2)
Could not find artifact difftest:difftest:pom:1.3.8 in clojars (http://clojars.org/repo/)
Could not find artifact difftest:difftest:pom:1.3.8 in sonatype-oss-public (https://oss.sonatype.org/content/groups/public/)
Could not find artifact difftest:difftest:jar:1.3.8 in central (http://repo1.maven.org/maven2)
Could not find artifact difftest:difftest:jar:1.3.8 in clojars (http://clojars.org/repo/)
Could not find artifact difftest:difftest:jar:1.3.8 in sonatype-oss-public (https://oss.sonatype.org/content/groups/public/)
Exception in thread "main" java.lang.RuntimeException: org.sonatype.aether.resolution.DependencyResolutionException: Could not find artifact difftest:difftest:jar:1.3.8 in central (http://repo1.maven.org/maven2)
Is the 1.3.8 POM not yet available? Do I need to add another repository to my sources list?
I'm using Clojure 1.3.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.