aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2022-07-17 01:53:20 +0200
committerGitHub <noreply@github.com>2022-07-17 01:53:20 +0200
commit7cb9f7aea300428fc38b5a71d1a6c48cf1f42efa (patch)
tree66ac5066ba415eeb3557ba129f0282c4feb44300 /tests
parentfix(jdtls): download milestone versions instead of snapshots (#87) (diff)
downloadmason-7cb9f7aea300428fc38b5a71d1a6c48cf1f42efa.tar
mason-7cb9f7aea300428fc38b5a71d1a6c48cf1f42efa.tar.gz
mason-7cb9f7aea300428fc38b5a71d1a6c48cf1f42efa.tar.bz2
mason-7cb9f7aea300428fc38b5a71d1a6c48cf1f42efa.tar.lz
mason-7cb9f7aea300428fc38b5a71d1a6c48cf1f42efa.tar.xz
mason-7cb9f7aea300428fc38b5a71d1a6c48cf1f42efa.tar.zst
mason-7cb9f7aea300428fc38b5a71d1a6c48cf1f42efa.zip
fix(mason-lspconfig): deduplicate :LspInstall completion items (#88)
Diffstat (limited to 'tests')
-rw-r--r--tests/mason-core/functional/list_spec.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/mason-core/functional/list_spec.lua b/tests/mason-core/functional/list_spec.lua
index 999b3625..ce0c285f 100644
--- a/tests/mason-core/functional/list_spec.lua
+++ b/tests/mason-core/functional/list_spec.lua
@@ -190,4 +190,9 @@ describe("functional: list", function()
it("joins lists", function()
assert.equals("Hello, John", _.join(", ", { "Hello", "John" }))
end)
+
+ it("should uniq_by lists", function()
+ local list = { "Person.", "Woman.", "Man.", "Person.", "Woman.", "Camera.", "TV." }
+ assert.same({ "Person.", "Woman.", "Man.", "Camera.", "TV." }, _.uniq_by(_.identity, list))
+ end)
end)