-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathroot_detection_spec.lua
More file actions
21 lines (20 loc) · 856 Bytes
/
Copy pathroot_detection_spec.lua
File metadata and controls
21 lines (20 loc) · 856 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
describe("Test root detection", function()
-- increase nio.test timeout
vim.env.PLENARY_TEST_TIMEOUT = 20000
-- add test_discovery script and treesitter parsers installed with luarocks
vim.opt.runtimepath:append(vim.fn.getcwd())
vim.opt.runtimepath:append(vim.fn.expand("~/.luarocks/lib/lua/5.1/"))
local nio = require("nio")
nio.tests.it("Detect .sln file as root", function()
local plugin = require("neotest-vstest")
local dir = vim.fn.getcwd() .. "/spec/samples/test_solution"
local root = plugin.root(dir)
assert.are_equal(dir, root)
end)
nio.tests.it("Detect .sln file as root from project dir", function()
local plugin = require("neotest-vstest")
local dir = vim.fn.getcwd() .. "/spec/samples/test_solution"
local root = plugin.root(dir .. "/src/FsharpTest")
assert.are_equal(dir, root)
end)
end)