GithubHelp home page GithubHelp logo

isabella232 / cljs-testrunners Goto Github PK

View Code? Open in Web Editor NEW

This project forked from funcool/cljs-testrunners

0.0 0.0 0.0 120 KB

ClojureScript test runners facilities/helpers.

License: BSD 2-Clause "Simplified" License

Clojure 100.00%

cljs-testrunners's Introduction

cljs-testrunners

ClojureScript test runners facilities/helpers.

Provides a easy way to run tests in nodejs/iojs and return proper exitcode on process is finished. This is mandatory if you want run tests in some integration tests service like travis, circleci or any other.

This package exists because clojurescript does not provides something like this out of the box. And printing results in console is not really useful.

Additionally, this package provides slightly more compact console output.

Quick Start

Add the cljs-testrunners to your dependencies list:

[funcool/cljs-testrunners "0.1.0-SNAPSHOT"]

Create a testrunner ns on your test directory:

;; file: yourappdir/test/yourapp/testrunner.cljs
(ns yourapp.testrunner
  (:require [cljs-testrunners.node :as node]
            [yourapp.fooo-tests]
            [yourapp.baar-tests]))

(defn main []
  (node/run-tests 'yourapp.fooo-tests
                  'yourapp.baar-tests))

(set! *main-cli-fn* main)

And configure your cljsbuild with something like this:

{:test-commands {"test" ["node" "tests.js"]}
 :builds [{:id "dev"
           :source-paths ["test"]
           :notify-command ["node" "tests.js"]
           :compiler {:output-to "tests.js"
                      :output-dir "out"
                      :source-map true
                      :static-fns true
                      :cache-analysis false
                      :main yourapp.testrunner
                      :optimizations :none
                      :target :nodejs
                      :pretty-print true}}]}

Maybe in a future we will add other environments for run tests.

cljs-testrunners's People

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.