Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Invariant failed: You should not use outside a

describe('Test suits for MyComponentWithLink', () => {
it('should match with snapshot', () => {
const tree = renderer
  .create(
    <BrowserRouter>
      <MyComponentWithLink/>
    </BrowserRouter>
  )
  .toJSON();
 expect(tree).toMatchSnapshot();
 });
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Invariant #You
ADD COMMENT
Topic
Name
1+4 =