util.array: Fix new() library function

This commit is contained in:
Kim Alvefur 2023-07-22 16:31:05 +02:00
parent 8b013e9471
commit a1f053229c
2 changed files with 10 additions and 1 deletions

View file

@ -1,6 +1,13 @@
local array = require "util.array";
describe("util.array", function ()
describe("creation", function ()
describe("new", function ()
it("works", function ()
local a = array.new({"a", "b", "c"});
assert.same({"a", "b", "c"}, a);
end);
end);
describe("from table", function ()
it("works", function ()
local a = array({"a", "b", "c"});