'What is the way to do Snapshot Testing without using 'react-test-renderer' library?

Currently I am doing React component testing using @testing-library/react and @testing-library/jest-dom. What is the way to do snapshot testing using above mentioned libraries ?

Note: 'react-test-renderer' is not permissible to use in application.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source