Diff

spec/util_array_spec.lua @ 13245:ffe4adbd2af9

util.array: Fix new() library function
author Kim Alvefur <zash@zash.se>
date Sat, 22 Jul 2023 16:31:05 +0200
parent 11787:3ae6fa901a8b
line wrap: on
line diff
--- a/spec/util_array_spec.lua	Sat Jul 22 16:20:36 2023 +0200
+++ b/spec/util_array_spec.lua	Sat Jul 22 16:31:05 2023 +0200
@@ -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"});