Skip to content

dm3/asynctest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

asynctest

Build Status

Clojure/script async test utilities.

Usage

Add the following dependency to your project.clj or build.boot:

[dm3/asynctest "0.1.0"]

then require the namespace:

(require '[asynctest.core :as asynctest])
;; In cljs
(require-macros '[asynctest.core :as asynctest])

Using from tests, e.g. in my_tests.cljc:

(ns my-tests
  (:require [clojure.test :refer [deftest testing is]]
            [asynctest.core :as at])
  #? (:cljs (:require-macros [asynctest.core :as at])))

(deftest my-test
  (at/async done
    (let [p (async-operation-returns-promise)]
      (at/yield
        (is (= :expected-result @p))
        (done)))))

License

Copyright © 2017 Vadim Platonov

Distributed under the MIT License.

Releases

No releases published

Packages

No packages published