Skip to content
This repository was archived by the owner on May 10, 2023. It is now read-only.

Change 'Run all tests' to only run those defined in the current project #145

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
19 changes: 12 additions & 7 deletions lib/proto-repl.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -564,13 +564,18 @@ module.exports = ProtoRepl =
@executeCodeInNs(code)

runAllTests: ->
if editor = atom.workspace.getActiveTextEditor()
if @isSelfHosted()
@stderr("Running tests is not supported yet in self hosted REPL.")
else
@refreshNamespaces =>
# Tests are only run if the refresh is successful.
@executeCode("(def all-tests-future (future (time (clojure.test/run-all-tests))))")
if @isSelfHosted()
@stderr("Running tests is not supported yet in self hosted REPL.")
else
@refreshNamespaces =>
# Tests are only run if the refresh is successful.
@executeCode("(do (require '[clojure.tools.namespace.dir :refer [scan-all]]
'[clojure.test :refer [run-tests]])
(->> (scan-all {})
:clojure.tools.namespace.track/load
(apply run-tests)
(time)
(future)))")

printVarDocumentation: ->
if editor = atom.workspace.getActiveTextEditor()
Expand Down