Skip to content

defclass/cljs-run-test

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 

Repository files navigation

(run-test)

Clojars Project

This library provides a macro (run-test) that you can use to run a single test with fixtures in clojurescript.

Usage

(ns my.project.test
  (:require [cljs-run-test :refer [run-test]
            [cljs.test     :refer [deftest is use-fixtures]]))  

(use-fixtures :each
  {:before #(println "Before")}
  {:after  #(println "After")})

(deftest one-equals-one
  (println "Running one-equals-one")
  (is (= 1 1)))

(run-test one-equals-one)
Before
Running one-equals-one
After
Ran 1 tests containing 1 assertions.
0 failures, 0 errors.

Or provide a fully qualified symbol from another namespace.

(ns my.project.other-ns
  (:require [cljs-run-test :refer [run-test]))

(run-test my.project.test/one-equals-one)

About

Run a single test in clojurescript.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Clojure 100.0%