Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
erichlf committed Apr 27, 2024
1 parent a9165d4 commit 74280f7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/devcontainer_cli/folder_utils_spec.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local folder_utils = require("devcontainer_cli.folder_utils")
local folder_utils = require("devcontainer-cli.folder_utils")

describe("In folder_utils functions", function()
it(
Expand All @@ -8,12 +8,12 @@ describe("In folder_utils functions", function()
-- This test assumes that we are in the root folder of the project
local project_root_folder = vim.fn.getcwd()
-- We change the current directory to a subfolder
vim.fn.chdir("lua/devcontainer_cli")
vim.fn.chdir("lua/devcontainer-cli")
local devcontainer_cli_folder = vim.fn.getcwd()
-- First we check that the we properly changed the directory
assert(devcontainer_cli_folder == project_root_folder .. "/lua/devcontainer_cli")
assert(devcontainer_cli_folder == project_root_folder .. "/lua/devcontainer-cli")
-- In such subfolder the function for getting the root_folder is called
local root_folder = folder_utils.get_root()
local root_folder = folder_utils.get_root(true)
-- From the subfolder, we check that the get_root function returns the folder where the git repo is located instead of the CWD
print("ROOT" .. root_folder)
print("PROJECT_ROOT" .. project_root_folder)
Expand Down

0 comments on commit 74280f7

Please sign in to comment.