From 64fd34672815726b60f11a06eb6889b2f5e46b14 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 26 Jun 2024 11:25:04 +0200 Subject: [PATCH] test: cleanup --- tests/core/e2e_spec.lua | 39 -------------------------------------- tests/core/plugin_spec.lua | 6 ++---- 2 files changed, 2 insertions(+), 43 deletions(-) delete mode 100644 tests/core/e2e_spec.lua diff --git a/tests/core/e2e_spec.lua b/tests/core/e2e_spec.lua deleted file mode 100644 index 37cdca5..0000000 --- a/tests/core/e2e_spec.lua +++ /dev/null @@ -1,39 +0,0 @@ -local Git = require("lazy.manage.git") - -describe("lazy", function() - before_each(function() - vim.g.lazy_did_setup = false - vim.go.loadplugins = true - for modname in pairs(package.loaded) do - if modname:find("lazy") == 1 then - package.loaded[modname] = nil - end - end - end) - - local root = ".tests/data/nvim/lazy" - - it("installs plugins", function() - local Lazy = require("lazy") - local Config = require("lazy.core.config") - - local neodev = false - Lazy.setup({ - { - "folke/neodev.nvim", - config = function() - neodev = true - end, - }, - "folke/paint.nvim", - }, { install_missing = true, defaults = { lazy = true } }) - assert(3 == vim.tbl_count(Config.plugins)) - assert(vim.uv.fs_stat(root .. "/paint.nvim/README.md")) - assert(vim.uv.fs_stat(root .. "/neodev.nvim/README.md")) - assert(not neodev) - assert(Config.plugins["neodev.nvim"]._.installed) - assert(not Config.plugins["neodev.nvim"]._.is_local) - assert.equal("https://github.com/folke/neodev.nvim.git", Git.get_origin(Config.plugins["neodev.nvim"].dir)) - assert.equal("https://github.com/folke/paint.nvim.git", Git.get_origin(Config.plugins["paint.nvim"].dir)) - end) -end) diff --git a/tests/core/plugin_spec.lua b/tests/core/plugin_spec.lua index f922d4b..87cea77 100644 --- a/tests/core/plugin_spec.lua +++ b/tests/core/plugin_spec.lua @@ -1,11 +1,9 @@ +---@module 'luassert' + local Config = require("lazy.core.config") local Handler = require("lazy.core.handler") local Plugin = require("lazy.core.plugin") -local assert = require("luassert") - -Config.setup() - local function inspect(obj) return vim.inspect(obj):gsub("%s+", " ") end