return function()local a=script.Parent.Parent local w=require(a)local B=a.Parent local b=require(B.Dev.LuauPolyfill)local V=b.instanceof local u=require(B.Dev.JestGlobals)local i=u.expect describe("\105\103\110\111\114\101\067\097\115\101",function()it("\104\097\115 \097 \096\105\103\110\111\114\101\067\097\115\101\096 \112\114\111\112\101\114\116\121 \115\101\116 \116\111 \116\114\117\101 \105\102 \116\104\101 \096\105\096 \102\108\097\103 \105\115 \117\115\101\100",function()(i((w("\102\111\111","\105")).ignoreCase)).toEqual(true)end)it("\104\097\115 \097 \096\105\103\110\111\114\101\067\097\115\101\096 \112\114\111\112\101\114\116\121 \115\101\116 \116\111 \102\097\108\115\101 \098\121 \100\101\102\097\117\108\116",function()(i((w("\102\111\111")).ignoreCase)).toEqual(false)end)end)describe("\109\117\108\116\105\108\105\110\101",function()it("\104\097\115 \097 \096\109\117\108\116\105\108\105\110\101\096 \112\114\111\112\101\114\116\121 \115\101\116 \116\111 \116\114\117\101 \105\102 \116\104\101 \096\109\096 \102\108\097\103 \105\115 \117\115\101\100",function()(i((w("\102\111\111","\109")).multiline)).toEqual(true)end)it("\104\097\115 \097 \096\109\117\108\116\105\108\105\110\101\096 \112\114\111\112\101\114\116\121 \115\101\116 \116\111 \102\097\108\115\101 \098\121 \100\101\102\097\117\108\116",function()(i((w("\102\111\111")).multiline)).toEqual(false)end)end)describe("\103\108\111\098\097\108",function()itSKIP("\104\097\115 \097 \096\103\108\111\098\097\108\096 \112\114\111\112\101\114\116\121 \115\101\116 \116\111 \116\114\117\101 \105\102 \116\104\101 \096\103\096 \102\108\097\103 \105\115 \117\115\101\100",function()(i((w("\102\111\111","\103")).global)).toEqual(true)end)itSKIP("\104\097\115 \097 \096\103\108\111\098\097\108\096 \112\114\111\112\101\114\116\121 \115\101\116 \116\111 \102\097\108\115\101 \098\121 \100\101\102\097\117\108\116",function()(i((w("\102\111\111")).global)).toEqual(false)end)end)describe("\116\111\083\116\114\105\110\103",function()it("\104\097\115 \097 \099\111\114\114\101\099\116 \116\111\115\116\114\105\110\103 \111\117\116\112\117\116",function()(i(tostring(w("\112\097\116\116\101\114\110")))).toEqual("\047\112\097\116\116\101\114\110\047")end)it("\104\097\115 \097 \099\111\114\114\101\099\116 \111\114\100\101\114\105\110\103 \111\102 \102\108\097\103\115 \105\110 \116\111\115\116\114\105\110\103 \111\117\116\112\117\116",function()(i(tostring(w("\114\101\103\101\120\112\092\100","\109\105")))).toEqual("\047\114\101\103\101\120\112\092\100\047\105\109")end)end)describe("\105\110\104\101\114\105\116\097\110\099\101",function()it("\102\111\108\108\111\119\115 \111\117\114 \101\120\112\101\099\116\097\116\105\111\110\115 \102\111\114 \105\110\104\101\114\105\116\097\110\099\101",function()(i(V(w("\116\101\115\116"),w))).toEqual(true)end)end)end
return function()
	local RegExpModule = script.Parent.Parent
	local RegExp = require(RegExpModule)

	local Packages = RegExpModule.Parent
	local LuauPolyfill = require(Packages.Dev.LuauPolyfill)
	local instanceof = LuauPolyfill.instanceof
	local JestGlobals = require(Packages.Dev.JestGlobals)
	local jestExpect = JestGlobals.expect

	describe("ignoreCase", function()
		it("has a `ignoreCase` property set to true if the `i` flag is used", function()
			jestExpect(RegExp("foo", "i").ignoreCase).toEqual(true)
		end)

		it("has a `ignoreCase` property set to false by default", function()
			jestExpect(RegExp("foo").ignoreCase).toEqual(false)
		end)
	end)

	describe("multiline", function()
		it("has a `multiline` property set to true if the `m` flag is used", function()
			jestExpect(RegExp("foo", "m").multiline).toEqual(true)
		end)

		it("has a `multiline` property set to false by default", function()
			jestExpect(RegExp("foo").multiline).toEqual(false)
		end)
	end)

	describe("global", function()
		-- deviation: `g` flag not implemented yet
		itSKIP("has a `global` property set to true if the `g` flag is used", function()
			jestExpect(RegExp("foo", "g").global).toEqual(true)
		end)

		-- deviation: `g` flag not implemented yet
		itSKIP("has a `global` property set to false by default", function()
			jestExpect(RegExp("foo").global).toEqual(false)
		end)
	end)

	describe("toString", function()
		it("has a correct tostring output", function()
			jestExpect(tostring(RegExp("pattern"))).toEqual("/pattern/")
		end)

		it("has a correct ordering of flags in tostring output", function()
			jestExpect(tostring(RegExp("regexp\\d", "mi"))).toEqual("/regexp\\d/im")
		end)
	end)

	describe("inheritance", function()
		it("follows our expectations for inheritance", function()
			jestExpect(instanceof(RegExp("test"), RegExp)).toEqual(true)
		end)
	end)
end
