1. import {printStore} from 'react-devtools-shared/src/devtools/utils';
    
  2. 
    
  3. // test() is part of Jest's serializer API
    
  4. export function test(maybeStore) {
    
  5.   // It's important to lazy-require the Store rather than imported at the head of the module.
    
  6.   // Because we reset modules between tests, different Store implementations will be used for each test.
    
  7.   // Unfortunately Jest does not reset its own serializer modules.
    
  8.   return (
    
  9.     maybeStore instanceof
    
  10.     require('react-devtools-shared/src/devtools/store').default
    
  11.   );
    
  12. }
    
  13. 
    
  14. // print() is part of Jest's serializer API
    
  15. export function print(store, serialize, indent) {
    
  16.   return printStore(store);
    
  17. }
    
  18. 
    
  19. // Used for Jest snapshot testing.
    
  20. // May also be useful for visually debugging the tree, so it lives on the Store.
    
  21. export {printStore};