local x=require("\064\112\107\103\047\064\106\115\100\111\116\108\117\097\047\106\101\115\116-\103\108\111\098\097\108\115")local s=x.beforeEach local F=x.expect local z=x.it local W=x.jest local M s(function()W.resetModules()M=require("\046\046\047\119\097\114\110\079\110\099\101")end)z("\119\097\114\110\115 \101\120\097\099\116\108\121 \111\110\099\101",function()(F(function()M("\111\108\100\065\080\073","\070\111\111")end)).toWarnDev("\087\097\114\110\105\110\103\058 \084\104\101 \108\101\103\097\099\121 \082\111\097\099\116 \065\080\073 \'\111\108\100\065\080\073\' \105\115 \100\101\112\114\101\099\097\116\101\100\044 \097\110\100 \119\105\108\108 \098\101 \114\101\109\111\118\101\100 \105\110 \097 \102\117\116\117\114\101 \114\101\108\101\097\115\101\046\n\n\070\111\111",{withoutStack=true});(F(function()M("\111\108\100\065\080\073","\070\111\111")end)).toWarnDev({})end)
--!strict
--[[
	* Copyright (c) Roblox Corporation. All rights reserved.
	* Licensed under the MIT License (the "License");
	* you may not use this file except in compliance with the License.
	* You may obtain a copy of the License at
	*
	*     https://opensource.org/licenses/MIT
	*
	* Unless required by applicable law or agreed to in writing, software
	* distributed under the License is distributed on an "AS IS" BASIS,
	* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
	* See the License for the specific language governing permissions and
	* limitations under the License.
]]

local JestGlobals = require("@pkg/@jsdotlua/jest-globals")
local beforeEach = JestGlobals.beforeEach
local jestExpect = JestGlobals.expect
local it = JestGlobals.it
local jest = JestGlobals.jest
local warnOnce

beforeEach(function()
	jest.resetModules()
	warnOnce = require("../warnOnce")
end)

it("warns exactly once", function()
	jestExpect(function()
		warnOnce("oldAPI", "Foo")
	end).toWarnDev(
		"Warning: The legacy Roact API 'oldAPI' is deprecated, and will be "
			.. "removed in a future release.\n\nFoo",
		{ withoutStack = true }
	)

	jestExpect(function()
		warnOnce("oldAPI", "Foo")
	end).toWarnDev({})
end)
