File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
test/nextjournal/markdown Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 37
37
{:extra-paths [" test" ]
38
38
:jvm-opts [" -Dclojure.main.report=stderr" ]
39
39
:extra-deps {nubank/matcher-combinators {:mvn/version " 3.9.1" }
40
+ babashka/fs {:mvn/version " 0.5.26" }
40
41
hiccup/hiccup {:mvn/version " 2.0.0-RC5" }}
41
42
:exec-fn test-runner/run}
42
43
Original file line number Diff line number Diff line change 1
1
(ns nextjournal.markdown.multi-threading-test
2
- (:require [clojure.test :as t :refer [deftest testing is]]
2
+ (:require [babashka.fs :as fs]
3
+ [clojure.java.io :as io]
4
+ [clojure.test :as t :refer [deftest is]]
3
5
[nextjournal.markdown :as md]))
4
6
7
+ (def notebook-file
8
+ ; ; we do this so test can be executed from arbitrary directory (i.e. in babashka's test suite)
9
+ (-> (or (io/resource *file*) *file*)
10
+ fs/parent
11
+ fs/parent
12
+ fs/parent
13
+ fs/parent
14
+ (fs/file " notebooks" " reference.md" )))
15
+
5
16
(deftest multithreading
6
17
(let [!exs (atom [])
7
18
proc (fn []
8
- (try (md/parse (slurp " notebooks/reference.md " ))
19
+ (try (md/parse (slurp notebook-file ))
9
20
(catch IllegalStateException e
10
21
(swap! !exs conj e))))
11
22
t1 (new Thread proc)
You can’t perform that action at this time.
0 commit comments