| 1 | /** |
| 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. |
| 3 | * |
| 4 | * This source code is licensed under the MIT license found in the |
| 5 | * LICENSE file in the root directory of this source tree. |
| 6 | * |
| 7 | * @emails react-core |
| 8 | */ |
| 9 | |
| 10 | 'use strict'; |
| 11 | |
| 12 | describe('shallow', () => { |
| 13 | it('throws an error on init', () => { |
| 14 | const ReactShallowRenderer = require('../shallow.js').default; |
| 15 | expect(() => { |
| 16 | // eslint-disable-next-line no-new |
| 17 | new ReactShallowRenderer(); |
| 18 | }).toThrow( |
| 19 | 'react-test-renderer/shallow has been removed. See https://react.dev/warnings/react-test-renderer.' |
| 20 | ); |
| 21 | }); |
| 22 | }); |