Git Product home page Git Product logo

boot-cljs-test's Introduction

boot-cljs-test/node-runner

[incracanophile/boot-cljs-test "0.3.2"]

Forked from boot-cljs-test/node-runner project. Boot tasks to run cljs.test in phantomjs. Node support files are present but not currently used or usable.

Usage

Add infracanophile.boot-cljs-test to your build.boot dependencies and require the namespace:

(set-env! :dependencies '[[infracanophile/boot-cljs-test "X.Y.Z-SNAPSHOT" :scope "test"]])
(require '[infracanophile.boot-cljs-test :refer [cljs-test-runner run-cljs-test])

You can see the options available on the command line:

$ boot cljs-test-runner -h
$ boot run-cljs-test -h

or in the REPL:

boot.user=> (doc cljs-test-runner)
boot.user=> (doc run-cljs-test)

Composing into a test runner task

(deftask cljs-test
  "Runs cljs tests once"
  [n namespaces NAMESPACES #{sym} "Symbols of namespaces to test"
   l limit-regex REGEX regex "A regex for limiting namespaces to be tested"
   t test-filters EXPR #{edn} "The set of expressions to use to filter tests"
   o output-path PATH str "A string representing the filepath to output test results"
   f formatter FORMATTER kw "Tag defining formatter to use. Accepts `junit`. Defaults to standard clojure.test output"]
  (comp (cljs-test-runner :namespaces namespaces
                          :limit-regex limit-regex
                          :test-filters test-filters
                          :formatter formatter)
        (cljs :source-map true
              :optimizations :none)
        (run-cljs-test :cmd "phantomjs --web-security false"
                       :output-path output-path)))
))

TODO

Refactoring to get rid of hardcoded junk, other test runners, more configuration arguments for tasks.

  • Nashorn runner
  • Electron runner

License

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

boot-cljs-test's People

Contributors

jessesherlock avatar mischov avatar myguidingstar avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

mischov

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.