Home / Companies / Semaphore / Blog / Post Details
Content Deep Dive

Testing Clojure With Expectations

Blog post from Semaphore

Post Details
Company
Date Published
Author
Nebojša Stričević
Word Count
437
Language
English
Hacker News Points
-
Summary

Clojure's built-in testing library, clojure.test, is complemented by several alternatives, including Expectations by Jay Fields, which is promoted as a minimalist unit testing framework with the slogan "adding signal, removing noise." Expectations simplifies setup by integrating with tools like Emacs and IntelliJ and requires only a few configurations in project.clj. It enhances testing by offering a concise syntax and producing more informative, visually appealing output with features like default color coding and precise failure descriptions. The framework excels in testing collections, focusing on both equality and content, and aggressively minimizes noise by trimming unnecessary stack trace details. Additionally, Expectations provides advanced capabilities for testing side effects and controlling test execution time, making it a powerful tool for developers seeking more efficient and effective testing practices.