UNPKG

@carbon/ibm-security

Version:

Carbon for Cloud & Cognitive IBM Security UI components

23 lines (21 loc) 720 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = expectWarning; var _react = require("@testing-library/react"); /** * @file Filter panel test utilities. * @copyright IBM Security 2021 */ function expectWarning(ui) { var _jest = jest, fn = _jest.fn, spyOn = _jest.spyOn; test('calls an unactionable prop deprecation warning', function () { var warn = spyOn(console, 'warn').mockImplementation(fn()); (0, _react.render)(ui); expect(warn).toBeCalledWith('Warning: \nThe prop `wrapperClassName` for Checkbox will be deprecated in V11 in favor of `className`. `className` will then be placed on the outer wrapper.'); warn.mockRestore(); }); }