From ac453fb79333f3ffb2fc8ecd86a322b27b56e493 Mon Sep 17 00:00:00 2001 From: Marin Minnerly Date: Mon, 23 Dec 2024 16:22:03 -0800 Subject: [PATCH] Remove unused test helper --- src/Testing/newFolder.luau | 13 ------------ src/Testing/newFolder.spec.luau | 36 --------------------------------- 2 files changed, 49 deletions(-) delete mode 100644 src/Testing/newFolder.luau delete mode 100644 src/Testing/newFolder.spec.luau diff --git a/src/Testing/newFolder.luau b/src/Testing/newFolder.luau deleted file mode 100644 index 2675b69..0000000 --- a/src/Testing/newFolder.luau +++ /dev/null @@ -1,13 +0,0 @@ -local function newFolder(children: { [string]: Instance }): Folder - local folder = Instance.new("Folder") - folder.Name = "Root" - - for name, child in pairs(children) do - child.Name = name - child.Parent = folder - end - - return folder -end - -return newFolder diff --git a/src/Testing/newFolder.spec.luau b/src/Testing/newFolder.spec.luau deleted file mode 100644 index 32ce1ba..0000000 --- a/src/Testing/newFolder.spec.luau +++ /dev/null @@ -1,36 +0,0 @@ -local JestGlobals = require("@pkg/JestGlobals") -local newFolder = require("./newFolder") - -local expect = JestGlobals.expect -local test = JestGlobals.test - -test("return a folder named 'Root'", function() - local folder = newFolder({}) - expect(folder:IsA("Folder")).toBe(true) - expect(folder.Name).toBe("Root") -end) - -test("name children after the dictionary keys", function() - local child1 = Instance.new("Part") - local child2 = Instance.new("Model") - - local folder: any = newFolder({ - Child1 = child1, - Child2 = child2, - }) - - expect(folder.Child1).toBe(child1) - expect(folder.Child2).toBe(child2) -end) - -test("support nesting newFolder as children", function() - local folder: any = newFolder({ - Child = newFolder({ - AnotherChild = newFolder({ - Module = Instance.new("ModuleScript"), - }), - }), - }) - - expect(folder.Child.AnotherChild.Module).toBeDefined() -end)