local e=require(script.Parent.normalize)return function()it("\115\104\111\117\108\100 \114\101\116\117\114\110 \078\111\114\109\097\108\105\122\101\100\079\112\116\105\111\110\115 \119\104\101\110 \112\114\111\118\105\100\101\100 \110\111\116\104\105\110\103",function()local Q=e();(expect(Q)).to.be.a("\116\097\098\108\101");(expect(Q.store)).to.equal("\070\101\097\116\117\114\101\070\108\097\103\115");(expect(Q.synchronizationInterval)).to.equal(60)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \078\111\114\109\097\108\105\122\101\100\079\112\116\105\111\110\115 \119\104\101\110 \112\114\111\118\105\100\101\100 \097\110 \101\109\112\116\121 \116\097\098\108\101",function()local Q=e({});(expect(Q)).to.be.a("\116\097\098\108\101");(expect(Q.store)).to.equal("\070\101\097\116\117\114\101\070\108\097\103\115");(expect(Q.synchronizationInterval)).to.equal(60)end)it("\115\104\111\117\108\100 \115\101\116 \115\121\110\099\104\114\111\110\105\122\097\116\105\111\110\073\110\116\101\114\118\097\108 \119\104\101\110 \112\114\111\118\105\100\101\100 \097 \115\116\111\114\101",function()local Q=e({store="\084\101\115\116\083\116\111\114\101"});(expect(Q)).to.be.a("\116\097\098\108\101");(expect(Q.store)).to.equal("\084\101\115\116\083\116\111\114\101");(expect(Q.synchronizationInterval)).to.equal(60)end)it("\115\104\111\117\108\100 \115\101\116 \115\116\111\114\101 \119\104\101\110 \112\114\111\118\105\100\101\100 \097 \115\121\110\099\104\114\111\110\105\122\097\116\105\111\110\073\110\116\101\114\118\097\108",function()local Q=e({synchronizationInterval=30});(expect(Q)).to.be.a("\116\097\098\108\101");(expect(Q.store)).to.equal("\070\101\097\116\117\114\101\070\108\097\103\115");(expect(Q.synchronizationInterval)).to.equal(30)end)it("\115\104\111\117\108\100 \099\114\101\097\116\101 \116\104\101 \115\097\109\101 \099\111\110\102\105\103\117\114\097\116\105\111\110 \119\104\101\110 \112\114\111\118\105\100\101\100 \097\108\108 \111\112\116\105\111\110\115",function()local Q=e({store="\084\101\115\116\083\116\111\114\101",synchronizationInterval=30});(expect(Q)).to.be.a("\116\097\098\108\101");(expect(Q.store)).to.equal("\084\101\115\116\083\116\111\114\101");(expect(Q.synchronizationInterval)).to.equal(30)end)end
local normalizeOptions = require(script.Parent.normalize)

return function()
	it("should return NormalizedOptions when provided nothing", function()
		local options = normalizeOptions()

		expect(options).to.be.a("table")
		expect(options.store).to.equal("FeatureFlags")
		expect(options.synchronizationInterval).to.equal(60)
	end)

	it("should return NormalizedOptions when provided an empty table", function()
		local options = normalizeOptions({})

		expect(options).to.be.a("table")
		expect(options.store).to.equal("FeatureFlags")
		expect(options.synchronizationInterval).to.equal(60)
	end)

	it("should set synchronizationInterval when provided a store", function()
		local options = normalizeOptions({
			store = "TestStore",
		})

		expect(options).to.be.a("table")
		expect(options.store).to.equal("TestStore")
		expect(options.synchronizationInterval).to.equal(60)
	end)

	it("should set store when provided a synchronizationInterval", function()
		local options = normalizeOptions({
			synchronizationInterval = 30,
		})

		expect(options).to.be.a("table")
		expect(options.store).to.equal("FeatureFlags")
		expect(options.synchronizationInterval).to.equal(30)
	end)

	it("should create the same configuration when provided all options", function()
		local options = normalizeOptions({
			store = "TestStore",
			synchronizationInterval = 30,
		})

		expect(options).to.be.a("table")
		expect(options.store).to.equal("TestStore")
		expect(options.synchronizationInterval).to.equal(30)
	end)
end
