Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
more test setup
  • Loading branch information
andrew committed Jun 13, 2016
1 parent 4966fdb commit a700224
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
7 changes: 5 additions & 2 deletions Makefile
Expand Up @@ -46,6 +46,9 @@ start:
@lein figwheel

test:
lein doo phantom test
lein doo phantom test once

.PHONY: help clean build-cljs install sass-dev sass-watch build start test
test-watch:
lein doo phantom test auto

.PHONY: help clean build-cljs install sass-dev sass-watch build start test test-watch
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -79,7 +79,8 @@ rebuild when a file changes. also builds sourcemaps.

```sh
# npm install -g phantomjs-prebuilt
make test
make test # execute tests once and exit
make test-watch # execute tests on file changes
```

the above command assumes that you have [phantomjs](https://www.npmjs.com/package/phantomjs) installed. however, please note that [doo](https://github.com/bensu/doo) can be configured to run cljs.test in many other js environments (phantom, chrome, ie, safari, opera, slimer, node, rhino, or nashorn).
Expand Down
4 changes: 2 additions & 2 deletions src/cljs/ulysses/utils.cljs
Expand Up @@ -273,8 +273,8 @@
"get the :width and :height of the current document"
[]
(let [d js/document
body (.-body d)
de (.-documentElement d)]
body (or (.-body d) #js {})
de (or (.-documentElement d) #js {})]
{:width (max
(.-scrollWidth body) (.-offsetWidth body)
(.-clientWidth de) (.-scrollWidth de) (.-offsetWidth de))
Expand Down
2 changes: 1 addition & 1 deletion test/cljs/ulysses/core_test.cljs
Expand Up @@ -4,4 +4,4 @@

(deftest fake-test
(testing "fake description"
(is (= 1 2))))
(is (= 2 2))))

0 comments on commit a700224

Please sign in to comment.