Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cljs tests #135

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,19 @@ jobs:
- store_test_results:
path: target/test2junit

test_cljs:
docker:
- image: circleci/clojure:lein-2.8.1

steps:
- checkout
- restore_cache:
keys:
- clj-deps-{{ checksum "project.clj" }}

- run: sudo apt update && sudo apt install chromium sassc
- run: lein test-cljs

coverage_clj:
<<: *base_docker
steps:
Expand All @@ -85,6 +98,10 @@ workflows:
build:
jobs:
- dependencies
- test_cljs:
requires:
- dependencies

- test_clj:
requires:
- dependencies
Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"dependencies": {
"react-datepicker": "1.5.0"
},
"devDependencies": {
"karma": "^4.0.0",
"karma-chrome-launcher": "^2.2.0"
}
}
9 changes: 7 additions & 2 deletions project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,15 @@
[ring/ring-mock "0.3.2"]]}}
:cljsbuild
{:builds
[{:id "min"
[{:id "test"
:source-paths ["src/cljs" "src/cljc" "test/cljc"]
:compiler {:output-to "resources/public/js/testable.js"
:main doo.test-runner
:optimizations :none}}

{:id "min"
:source-paths ["src/cljs" "src/cljc"]
:compiler {:main elo.core

:output-to "resources/public/cljs-out/elo-main.js"
:asset-path "resources/public/cljs-out/elo"
:optimizations :simple
Expand Down
15 changes: 10 additions & 5 deletions test/doo/test_runner.cljs
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
;; (ns doo.test-runner
;; (:require [doo.runner :refer-macros [doo-tests]]
;; [elo.algorithms.elo]
;; [elo.algorithms.elo-test]))
(ns doo.test-runner
(:require [doo.runner :refer-macros [doo-tests]]
[elo.rankings-test]
[elo.games-test]
[elo.stats-test]
[elo.algorithms.elo-test]))

;; (doo-tests 'elo.algorithms.elo-test)
(doo-tests 'elo.rankings-test
'elo.games-test
'elo.stats-test
'elo.algorithms.elo-test)