cemerick/clojurescript.test — pull request #40 by grzm (2014-01-25 01:15:08+00:00)
Title: Refactor runner setup.

After contributing the node.js runner, I wasn't happy with the procedural nature of the changes I made to the `clojurescript.test.plugin/middleware` function. This patch ameliorates that damage, isolating runner temp file setup into a simple `runner-path!` function. Along with the `runner-paths!` helper, the hash-map used to replace runner keywords with their associated javascript paths can be generated from a simple `runners` data structure that associates the runner keywords with their resources.

Currently there's a little duplication: rather than specifying that both `:node-runner` and `:nodejs-runner` correspond to the same resource, I've duplicated the resource, which also means that an additional temp file is created. However, I thought that this little bit of duplication overhead is preferable to using a more complicated data structure such as
```clojure
[[:runner "cemerick/cljs/test/runner.js"]
[[:node-runner :nodejs-runner] "cemerick/cljs/test/node_runner.js"]]
```