https://github.com/nedap/utils.test
test helpers for Clojure test
https://github.com/nedap/utils.test
clojure clojurescript kaocha matcher-combinators sts testing
Last synced: 22 days ago
JSON representation
test helpers for Clojure test
- Host: GitHub
- URL: https://github.com/nedap/utils.test
- Owner: nedap
- License: epl-2.0
- Created: 2019-05-24T09:34:55.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2023-01-11T09:07:15.000Z (over 2 years ago)
- Last Synced: 2025-03-25T04:07:55.784Z (29 days ago)
- Topics: clojure, clojurescript, kaocha, matcher-combinators, sts, testing
- Language: Clojure
- Homepage:
- Size: 116 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: .github/contributing.md
- License: LICENSE
Awesome Lists containing this project
README
# utils.test [](https://circleci.com/gh/nedap/utils.test)
A collection of test helpers.
## Synopsis
* `nedap.utils.test.api/meta=` compares both objects and their metadata, recursively.
* `nedap.utils.test.api/macroexpansion=` compares objects, deeming any gensyms as equal.
* `nedap.utils.test.api/run-tests` macroexpands to its clojure.test/cljs.test counterpart. It only adds something for the cljs variant: it sets an adequate exit code to the Node process.
* `nedap.utils.test.api/expect` allows you to assert side effects in code. look at [examples in the tests](https://github.com/nedap/utils.test/blob/55021bf884fb06aa3cb9d2706ffe6816a2923e45/test/unit/nedap/utils/test/api.cljc#L119-L123).
* `nedap.kacoha.focus-file-plugin` Kaocha plugin which adds `--focus-file` cli-option. Can be used to test a specific file rather than a specific file.
## Installation
```clojure
[com.nedap.staffing-solutions/utils.test "1.9.0"]
```## ns organisation
- `nedap.utils.test.api`
- `nedap.utils.test.matchers` [matcher-combinators](https://github.com/nubank/matcher-combinators) matchers
- `nedap.kaocha` [koacha](https://github.com/lambdaisland/kaocha) plugins## Documentation
Please browse the public namespaces, which are documented, speced and tested.
## Development
The default namespace is `dev`. Under it, `(refresh)` is available, which should give you a basic "Reloaded workflow".
> It is recommended that you use `(clojure.tools.namespace.repl/refresh :after 'formatting-stack.core/format!)`.
You can find examples in the [api test](test/unit/nedap/utils/test/api.cljc).
## License
Copyright © Nedap
This program and the accompanying materials are made available under the terms of the [Eclipse Public License 2.0](https://www.eclipse.org/legal/epl-2.0).