local Z=script.Parent.Parent.Parent.Parent local N=Z.Parent local l=require(N.Dev.JestGlobals)local d=l.describe local t=l.expect local B=l.it local w=(require(script.Parent.Parent.storeUtils)).getStoreKeyName d("\103\101\116\083\116\111\114\101\075\101\121\078\097\109\101",function()B("\115\104\111\117\108\100 \114\101\116\117\114\110 \097 \100\101\116\101\114\109\105\110\105\115\116\105\099 \118\101\114\115\105\111\110 \111\102 \116\104\101 \115\116\111\114\101 \107\101\121 \110\097\109\101 \110\111 \109\097\116\116\101\114 \119\104\105\099\104 \111\114\100\101\114 \116\104\101 \097\114\103\115 \111\098\106\101\099\116 \112\114\111\112\101\114\116\105\101\115 \097\114\101 \105\110",function()local Z="\115\111\109\101\070\105\101\108\100\040\123\"\112\114\111\112\049\"\058\"\118\097\108\117\101\049\"\044\"\112\114\111\112\050\"\058\"\118\097\108\117\101\050\"\125\041"local N=w("\115\111\109\101\070\105\101\108\100",{prop1="\118\097\108\117\101\049";prop2="\118\097\108\117\101\050"},nil);(t(N)).toEqual(Z)N=w("\115\111\109\101\070\105\101\108\100",{prop2="\118\097\108\117\101\050";prop1="\118\097\108\117\101\049"},nil);(t(N)).toEqual(Z)end)end)return{}
--[[
 * Copyright (c) 2021 Apollo Graph, Inc. (Formerly Meteor Development Group, Inc.)
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
]]
-- ROBLOX upstream: https://github.com/apollographql/apollo-client/blob/v3.4.2/src/utilities/graphql/__tests__/storeUtils.ts

local srcWorkspace = script.Parent.Parent.Parent.Parent
local rootWorkspace = srcWorkspace.Parent

local JestGlobals = require(rootWorkspace.Dev.JestGlobals)
local describe = JestGlobals.describe
local expect = JestGlobals.expect
local it = JestGlobals.it

local getStoreKeyName = require(script.Parent.Parent.storeUtils).getStoreKeyName

describe("getStoreKeyName", function()
	it(
		"should return a deterministic version of the store key name no matter "
			.. "which order the args object properties are in",
		function()
			local validStoreKeyName = 'someField({"prop1":"value1","prop2":"value2"})'
			local generatedStoreKeyName = getStoreKeyName("someField", { prop1 = "value1", prop2 = "value2" }, nil)
			expect(generatedStoreKeyName).toEqual(validStoreKeyName)

			generatedStoreKeyName = getStoreKeyName("someField", { prop2 = "value2", prop1 = "value1" }, nil)
			expect(generatedStoreKeyName).toEqual(validStoreKeyName)
		end
	)
end)

return {}
