local Z=script.Parent.Parent.Parent.Parent local O=require(Z.Dev.JestGlobals)local y=O.describe local S=O.expect local G=O.it local g=require(script.Parent.Parent.encodeURIComponent)y("\101\110\099\111\100\101\085\082\073\067\111\109\112\111\110\101\110\116",function()G("\115\104\111\117\108\100 \101\110\099\111\100\101 \115\116\114\105\110\103\115 \112\114\111\112\101\114\108\121",function()local Z="\059\044\047\063\058\064\038\061\043\036"local O="-\095\046\033~\042\'\040\041"local y="\035"local G="\065\066\067 \097\098\099 \049\050\051"local T="\035\036\038\043\044\047\058\059\061\063\064";(S(g(Z))).toEqual("\037\051\066\037\050\067\037\050\070\037\051\070\037\051\065\037\052\048\037\050\054\037\051\068\037\050\066\037\050\052");(S(g(O))).toEqual("-\095\046\033~\042\'\040\041");(S(g(y))).toEqual("\037\050\051");(S(g(G))).toEqual("\065\066\067\037\050\048\097\098\099\037\050\048\049\050\051");(S(g(T))).toEqual("\037\050\051\037\050\052\037\050\054\037\050\066\037\050\067\037\050\070\037\051\065\037\051\066\037\051\068\037\051\070\037\052\048")end)end)return{}
--[[
 * Copyright (c) Roblox Corporation
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
]]
-- ROBLOX upstream: no upstream
local rootWorkspace = script.Parent.Parent.Parent.Parent

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

local encodeURIComponent = require(script.Parent.Parent.encodeURIComponent)

describe("encodeURIComponent", function()
	it("should encode strings properly", function()
		local set1 = ";,/?:@&=+$" -- Reserved Characters
		local set2 = "-_.!~*'()" -- Unescaped Characters
		local set3 = "#" -- Number Sign
		local set4 = "ABC abc 123" -- Alphanumeric Characters + Space
		local set5 = "#$&+,/:;=?@" -- Custom set

		expect(encodeURIComponent(set1)).toEqual("%3B%2C%2F%3F%3A%40%26%3D%2B%24")
		expect(encodeURIComponent(set2)).toEqual("-_.!~*'()")
		expect(encodeURIComponent(set3)).toEqual("%23")
		expect(encodeURIComponent(set4)).toEqual("ABC%20abc%20123") -- the space gets encoded as %20
		expect(encodeURIComponent(set5)).toEqual("%23%24%26%2B%2C%2F%3A%3B%3D%3F%40")
	end)
end)

return {}
