Skip to content
This repository has been archived by the owner on Sep 7, 2021. It is now read-only.

Commit

Permalink
Add a test
Browse files Browse the repository at this point in the history
  • Loading branch information
jacekschae committed Dec 5, 2017
1 parent 8c6624b commit fbe3538
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -3,4 +3,5 @@
/*-init.clj
/resources/public/js
.nrepl-port
.lein-failures
out
9 changes: 8 additions & 1 deletion project.clj
Expand Up @@ -14,6 +14,7 @@
:jvm-opts ["--add-modules" "java.xml.bind"]

:plugins [[lein-cljsbuild "1.1.5"]
[lein-doo "0.1.8"]
[lein-figwheel "0.5.13"]]

:hooks [leiningen.cljsbuild]
Expand All @@ -33,7 +34,13 @@
:prod {:cljsbuild
{:builds {:client {:compiler {:optimizations :advanced
:elide-asserts true
:pretty-print false}}}}}}
:pretty-print false}}}}}
:test {:cljsbuild
{:builds {:client {:source-paths ["src/conduit" "test"]
:compiler {:optimizations :none
:main test.runner
:output-to "resources/public/test"
:output-dir "resources/public/test/out"}}}}}}
:figwheel {:server-port 3449
:repl true}

Expand Down
9 changes: 9 additions & 0 deletions resources/public/test.js
@@ -0,0 +1,9 @@
var CLOSURE_UNCOMPILED_DEFINES = {};
var CLOSURE_NO_DEPS = true;
if(typeof goog == "undefined") document.write('<script src="js/goog/base.js"></script>');
document.write('<script src="js/goog/deps.js"></script>');
document.write('<script src="js/cljs_deps.js"></script>');
document.write('<script>if (typeof goog == "undefined") console.warn("ClojureScript could not load :main, did you forget to specify :asset-path?");</script>');
document.write('<script>goog.require("re_frisk.preload");</script>');
document.write('<script>goog.require("process.env");</script>');
document.write('<script>goog.require("test.runner");</script>');
9 changes: 9 additions & 0 deletions test/core_test.cljs
@@ -0,0 +1,9 @@
(ns test.core-test
(:require [cljs.test :refer-macros [deftest testing is]]
[test.core :as core]))

;; Working on it ...
;;
(deftest one-is-one
(testing "if one equals one"
(is (= 1 1))))
5 changes: 5 additions & 0 deletions test/runner.cljs
@@ -0,0 +1,5 @@
(ns test.runner
(:require [doo.runner :refer-macros [doo-tests]]
[test.core-test]))

(doo-tests 'test.core-test)

0 comments on commit fbe3538

Please sign in to comment.