Coder Social home page Coder Social logo

duct-doo's Introduction

duct-doo

Multimethods for Duct to run ClojureScript tests with doo.

Installation

Clojars Project

Add these coordinates to your build tool: [duct-doo "0.1.0"].

There's presently (2018-05-10) an issue when trying to compile core.rrb-vector for ClojureScript. In the mean time, you should add :exclusions [org.clojure/core.rrb-vector] to your project.clj, and instead depend on [quantum/org.clojure.core.rrb-vector "0.0.12"].

Usage

Add the :duct-doo.runner/test key to your integrant config:

Configure

;; Example
:duct-doo.runner/test
{:src-paths     ["src" "test"]
 :no-op?        false
 :doo-opts      {:paths  {:karma "karma --port=9000"}
                 :js-env :chrome-headless}
 :compiler-opts {:main "your-project.test-runner"}}
  • src-paths -> where cljs sources live, default src + test
  • compiler-opts -> passed through to CLJS compiler
  • doo-opts -> options to pass through to doo

Write a test runner

Write a CLJS file with the same namespace as you set under the :main key:

(ns your-project.test-runner
    (:require [doo.runner :refer-macros [doo-tests]]
              [your-project.core-test]   ; CHANGE US
              [your-project.util-test])) ; etc...

(doo-tests 'your-project.core-test  ; CHANGE US TOO
           'your-project.util-test) ;

The test-runner could probably be moved inside the library, but I haven't figured out how to do that yet.

Turning it off

If, for example, you're working on some backend code and you don't want your ClojureScript tests to be run every time you (reset) your REPL, set the no-op? key to true.

License

Copyright © 2018 David Duthie

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

duct-doo's People

Contributors

daveduthie avatar dependabot[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.