Skip to content

Commit

Permalink
Use current ns only if it's a known test ns
Browse files Browse the repository at this point in the history
  • Loading branch information
julienvincent committed Aug 28, 2024
1 parent ec28002 commit 4a7f13e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/clojure-test/api/init.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
local location = require("clojure-test.api.location")
local tests_api = require("clojure-test.api.tests")
local run_api = require("clojure-test.api.run")
local utils = require("clojure-test.utils")
local nio = require("nio")

local M = {}
Expand Down Expand Up @@ -44,7 +45,8 @@ function M.run_tests_in_ns()
nio.run(function()
local namespaces
local current_namespace = location.get_current_namespace()
if current_namespace then
local test_namespaces = tests_api.get_test_namespaces()
if current_namespace and utils.included_in_table(test_namespaces, current_namespace) then
namespaces = { current_namespace }
else
namespaces = tests_api.select_namespaces()
Expand Down

0 comments on commit 4a7f13e

Please sign in to comment.