https://github.com/dm3/asynctest
Clojure/script async test utilities
https://github.com/dm3/asynctest
async clj cljs clojure clojurescript library testing utilities
Last synced: 3 months ago
JSON representation
Clojure/script async test utilities
- Host: GitHub
- URL: https://github.com/dm3/asynctest
- Owner: dm3
- Created: 2017-06-21T20:42:39.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-21T20:49:06.000Z (about 8 years ago)
- Last Synced: 2025-01-20T06:16:36.720Z (5 months ago)
- Topics: async, clj, cljs, clojure, clojurescript, library, testing, utilities
- Language: Clojure
- Size: 3.91 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# asynctest
[](https://travis-ci.org/dm3/asynctest)
Clojure/script async test utilities.
## Usage
Add the following dependency to your project.clj or build.boot:
```clojure
[dm3/asynctest "0.1.0"]
```then require the namespace:
```clojure
(require '[asynctest.core :as asynctest])
;; In cljs
(require-macros '[asynctest.core :as asynctest])
```Using from tests, e.g. in `my_tests.cljc`:
```clojure
(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.