Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

Latest commit

 

History

History
109 lines (72 loc) · 2.09 KB

dev.md

File metadata and controls

109 lines (72 loc) · 2.09 KB

Developing and Testing md2c8e

Dependencies

MacOS Quick Start

With Homebrew:

# NB: you may already have a different Java installed, or you may wish to
# install a different Java than the default Homebrew formula installs. If so,
# remove `java` from the command below and install the Java of your choice,
# if necessary.
brew install java clojure/tools/clojure pandoc borkdude/brew/clj-kondo

Convenience Scripts

These use cases are described in more detail below, but here’s a quick list of our convenience scripts:

  • bin/repl starts a REPL
  • bin/kaocha runs all the test suites
  • bin/kondo lints the source code

Starting a REPL

# From the root of the project
clj -A:dev:test

# Or with the convenience script:
bin/repl

Testing

This project uses Kaocha as its test runner.

Each subdirectory under test is a test suite, e.g. examples, integration, property, etc.

Running the tests

From a shell

# Run all suites
bin/kaocha

# Run a single suite
bin/kaocha integration

From a REPL

(use 'kaocha.repl)

; Run all suites
(run-all)

; Run a single suite
(run :unit)

; Run a single namespace
(run 'md2c8e.core-test)

; Run a single test var
(run 'md2c8e.core-test/test-readme?)

Linting

This project currently uses clj-kondo for linting — running basic sanity checks on the source code.

If you’re on MacOS, you can install it easily via Homebrew:

brew install borkdude/brew/clj-kondo

You can run it via:

bin/kondo