Skip to content

viebel/template-test-js-with-clj

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rationale

Clojurescript provides powerful tools and semantics for testing code like deftest and test.check (generative testing). This repository is a template for testing javascript code with clojurescript code.

Structure

There is a javascript file main.js that defines a javascript function foo.

There is a clojurescript file core_test.cljs that tests foo.

core_test.cljs

In project.clj, main.js is defined as a :foreign-libs, so we can :require it from clojurescript.

The tests are run with lein doo.

Simple, no?

How to run

lein doo phantom test

Modify the code of the test inside src/js_test_in_cljs/test/core_test.cljs and the tests re-run automatically in under 1 second.

About

A template for testing javascript code with clojurescript: test.check, unit tests, figwheel

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published