Something went wrong. Try again.
Something went wrong. Try again.
694 B · 24 lines
Lua
at main
12345678910111213141516171819202122232425---@module 'luassert'
require("spec.minimal_init")
local function open(path) vim.cmd.edit(path) return 0end
local function remove_cwd(path) path = path:gsub(vim.pesc(vim.fn.getcwd()) .. "/", "") return pathend
describe("dotenv", function() it("find dotenv file with same name to http file", function() open("spec/examples/dotenv/with_dotenv.http") assert.same("spec/examples/dotenv/with_dotenv.env", remove_cwd(vim.b._rest_nvim_env_file)) end) it("find dotenv file in parent dir", function() open("spec/examples/dotenv/without_dotenv.http") assert.same("spec/examples/.env", remove_cwd(vim.b._rest_nvim_env_file)) end)end)