You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29-1
Original file line number
Diff line number
Diff line change
@@ -71,7 +71,35 @@ $ clojure -Atest --help
71
71
72
72
## Gotchas
73
73
74
-
* Make sure the directory (or directories!) containing your tests are on your Java class path. Specify this with a top level `:paths` key in your `deps.edn` file.
74
+
### Paths
75
+
76
+
Make sure the directory (or directories!) containing your tests are on your Java class path. Specify this with a top level `:paths` key in your `deps.edn` file.
77
+
78
+
### Advanced compilation
79
+
80
+
This actually applies to everything other than `{:optimizations :none}` (which is the default). To use any Closure Compiler optimisation levels you will need to create an EDN file containing something like this:
81
+
82
+
```edn
83
+
{:optimizations :advanced}
84
+
```
85
+
86
+
The Closure compiler requires the generated test runner to be on the path so you'll need to add this to your `:paths` key in your `deps.edn`:
87
+
88
+
```edn
89
+
:paths ["src" "test" "cljs-test-runner-out/gen"]
90
+
```
91
+
92
+
It will fail the first time you run this, that's because that directory doesn't exist yet so it'll be removed from the path on startup. To fix this you can run the following before executing your tests:
93
+
94
+
```bash
95
+
mkdir -p cljs-test-runner-out/gen
96
+
```
97
+
98
+
Now when you run the following, your tests will be executed with advanced compilation:
0 commit comments