-- ROBLOX deviation: we don't use the Error polyfill because we encounter an error with TestEZ

function ensureMockOrSpy(
	received: any,
	matcherName: string,
	expectedArgument: string,
	options: JestMatcherUtils.MatcherHintOptions
)
	if not isMock(received) and not isSpy(received) then
		error(
			Error(
				matcherErrorMessage(
					matcherHint(matcherName, nil, expectedArgument, options),
					("%s value must be a mock or spy function"):format(RECEIVED_COLOR("received")),
					printWithType("Received", received, printReceived)
				)
			)
		)
	end
end
