local v=import("\046\047\073\110\115\116\097\110\099\101")describe("\073\110\115\116\097\110\099\101",function()it("\115\104\111\117\108\100 \099\114\101\097\116\101 \105\110\115\116\097\110\099\101\115 \111\102 \111\098\106\101\099\116\115",function()local K=v.new("\070\111\108\100\101\114")assert.not_nil(K)end)it("\115\104\111\117\108\100 \101\114\114\111\114 \119\104\101\110 \103\105\118\101\110 \105\110\118\097\108\105\100 \105\110\115\116\097\110\099\101 \110\097\109\101\115",function()assert.has.errors(function()v.new("\117\103\104 \110\111")end)end)describe("\080\097\114\101\110\116",function()it("\115\104\111\117\108\100 \098\101 \115\101\116 \116\111 \110\105\108 \098\121 \100\101\102\097\117\108\116",function()local K=v.new("\070\111\108\100\101\114")assert.equal(K.Parent,nil)end)it("\115\104\111\117\108\100 \098\101 \115\101\116 \116\111 \116\104\101 \103\105\118\101\110 \118\097\108\117\101 \105\102 \097\118\097\105\108\097\098\108\101",function()local K=v.new("\070\111\108\100\101\114")local c=v.new("\070\111\108\100\101\114",K)c.Name="\102\111\111"assert.equal(c.Parent,K)assert.equal(K:FindFirstChild("\102\111\111"),c)end)end)end)
local Instance = import("./Instance")

describe("Instance", function()
	it("should create instances of objects", function()
		local new = Instance.new("Folder")

		assert.not_nil(new)
	end)

	it("should error when given invalid instance names", function()
		assert.has.errors(function()
			Instance.new("ugh no")
		end)
	end)

	describe("Parent", function()
		it("should be set to nil by default", function()
			local instance = Instance.new("Folder")

			assert.equal(instance.Parent, nil)
		end)

		it("should be set to the given value if available", function()
			local parent = Instance.new("Folder")

			local child = Instance.new("Folder", parent)
			child.Name = "foo"

			assert.equal(child.Parent, parent)
			assert.equal(parent:FindFirstChild("foo"), child)
		end)
	end)
end)