aboutsummaryrefslogtreecommitdiffstats
path: root/tests/mason-core/functional/table_spec.lua
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2022-12-08 02:06:23 +0100
committerGitHub <noreply@github.com>2022-12-08 01:06:23 +0000
commit9394bcc5c582e737f0ff6bba1e411f97ee9c8c5d (patch)
tree9729e9a1dfc493dbc7a0b2a4dfb359856c9de192 /tests/mason-core/functional/table_spec.lua
parentfeat(functional): add more functions (#741) (diff)
downloadmason-9394bcc5c582e737f0ff6bba1e411f97ee9c8c5d.tar
mason-9394bcc5c582e737f0ff6bba1e411f97ee9c8c5d.tar.gz
mason-9394bcc5c582e737f0ff6bba1e411f97ee9c8c5d.tar.bz2
mason-9394bcc5c582e737f0ff6bba1e411f97ee9c8c5d.tar.lz
mason-9394bcc5c582e737f0ff6bba1e411f97ee9c8c5d.tar.xz
mason-9394bcc5c582e737f0ff6bba1e411f97ee9c8c5d.tar.zst
mason-9394bcc5c582e737f0ff6bba1e411f97ee9c8c5d.zip
test(functional): add some tests (#742)
Forgot to include these in the last commit.
Diffstat (limited to 'tests/mason-core/functional/table_spec.lua')
-rw-r--r--tests/mason-core/functional/table_spec.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/mason-core/functional/table_spec.lua b/tests/mason-core/functional/table_spec.lua
index 7516e33a..c897b5ca 100644
--- a/tests/mason-core/functional/table_spec.lua
+++ b/tests/mason-core/functional/table_spec.lua
@@ -5,6 +5,10 @@ describe("functional: table", function()
assert.equals("hello", _.prop("a", { a = "hello" }))
end)
+ it("retrieves nested property of table", function()
+ assert.equals("hello", _.path({ "a", "greeting" }, { a = { greeting = "hello" } }))
+ end)
+
it("picks properties of table", function()
local function fn() end
assert.same(