Skip to content

Commit 2c67fb8

Browse files
Compile the cljs to the js bundle and update RSS feed
1 parent 0049b38 commit 2c67fb8

File tree

2 files changed

+1147
-1146
lines changed

2 files changed

+1147
-1146
lines changed

resources/public/blog/rss/clojure-feed.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><atom:link href="https://www.loicblanchard.me/blog/rss/clojure-feed.xml" rel="self" type="application/rss+xml"></atom:link><title>Loic Blanchard - Clojure Blog Feed</title><link>https://www.loicblanchard.me</link><description>Articles related to Clojure</description><language>en-us</language><lastBuildDate>Tue, 03 Sep 2024 12:05:27 +0000</lastBuildDate><generator>clj-rss</generator><item><title>Testing in Clojure</title><link>https://www.loicblanchard.me/blog/testing-in-clojure</link><guid isPermaLink="false">https://www.loicblanchard.me/blog/testing-in-clojure</guid><pubDate>Sat, 10 Aug 2024 10:00:00 +0000</pubDate><description>
1+
<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><atom:link href="https://www.loicblanchard.me/blog/rss/clojure-feed.xml" rel="self" type="application/rss+xml"></atom:link><title>Loic Blanchard - Clojure Blog Feed</title><link>https://www.loicblanchard.me</link><description>Articles related to Clojure</description><language>en-us</language><lastBuildDate>Tue, 12 Nov 2024 15:12:36 +0000</lastBuildDate><generator>clj-rss</generator><item><title>Testing in Clojure</title><link>https://www.loicblanchard.me/blog/testing-in-clojure</link><guid isPermaLink="false">https://www.loicblanchard.me/blog/testing-in-clojure</guid><pubDate>Sat, 10 Aug 2024 10:00:00 +0000</pubDate><description>
22
Introducing some popular testing tools to developers new to Clojure. Highlight solutions for how to do unit testing with Rich Comment Tests, data validation and generative testing with Malli, running test suites and metrics with Kaocha and how to do integration testing using external containerized services.
33
</description><content:encoded><![CDATA[<h2>Introduction</h2><p>This article introduces effective testing libraries and methods for those new to Clojure.</p><p>We'll explore using the <a href='https://github.com/lambdaisland/kaocha'>kaocha</a> test runner in both REPL and terminal, along with configurations to enhance feedback. Then we will explain how tests as documentation can be done using <a href='https://github.com/matthewdowney/rich-comment-tests'>rich-comment-tests</a>.</p><p>We will touch on how to do data validation, generation and instrumentation using <a href='https://github.com/metosin/malli'>malli</a>.</p><p>Finally, I will talk about how I manage integrations tests with eventual external services involved.</p><h2>Test good code</h2><h3>Pure functions</h3><p>First of all, always remember that it is important to have as many pure functions as possible. It means, the same input passed to a function always returns the same output. This will simplify the testing and make your code more robust.</p><p>Here is an example of unpredictable <strong>impure</strong> logic:</p><pre><code class="clojure">&#40;defn fib
44
&quot;Read the Fibonacci list length to be returned from a file,

0 commit comments

Comments
 (0)