Skip to main content

debug()

Preview application's UI when testing with Jest to an external browser. Need to start the Jest Preview server beforehand.

info

Automatic Mode is now available and is recommended for general use, instead of manually triggering preview.debug().

+import preview from 'jest-preview';
describe('App', () => {
it('should work as expected', () => {
render(<App />);
+ preview.debug();
});
});

Or:

+import { debug } from 'jest-preview';
describe('App', () => {
it('should work as expected', () => {
render(<App />);
+ debug();
});
});