markmandel/brute — pull request #4 by Janiczek (2014-07-06 05:53:35+00:00)
Title: port of Brute w/ tests to ClojureScript, introducing cljx

With this commit, Brute `0.2.1` now
- **works in ClojureScript**
- uses `cljx`
- **uses `purnam.test` as a CLJS replacement for `midje`**, along with `karma` (see [here](https://github.com/purnam/example.purnam.test))
- has an alias for running tests on both JVM and JS: `lein cleantest`
- cleans
- compiles `cljx` to `clj` and `cljs`
- runs `midje`
- compiles `cljs`
- runs `karma`

I've had to disable your `dev` profile REPL customization - it was consistently crashing my attempts to make cljx work. Maybe some fiddling with the vector of paths will make it work again. I didn't know what's your workflow with that, so I didn't test it.

Other thing is that `purnam.test` is really trimmed compared to `midje`. Things like `(just #{...})` or `namespace-state-changes` just aren't there, which required me to hack around a few places. But I guess it's still better to have this until some better midje port comes than having, say, `clojurescript.test` and not being possible to have a shared test codebase.

I didn't test the doc generation, but given what is in `project.clj`, it should see the `clj` sources in `target/generated/src/clj` and tests in `target/generated/test/clj`.

`karma` requires you (or at least required me) to install NPM modules
- `karma`
- `karma-cli`
- `karma-jasmine`
- `jasmine-node`

Also, `karma` doesn't like `advanced` compilation (probably would need externs file or something so that it doesn't shorten the `jasmine` variable added to `js/window`) so we run in `whitespace` mode.