Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Jest toolsNew to Visual Studio Code? Get it now.
Jest tools

Jest tools

Raathi

|
1,615 installs
| (0) | Free
Making it easier to debug jest tests
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Jest tools let you inspect html from your Jest tests with ease when logging to console is not enough.

Getting started

  • Install the VSCode extension.
  • From VSCode's command palette, run the Jest tools: Start jest tools command.
  • This will show you the Jest tools UI. The initial screen will ask you to start Jest with additional command line arguments (A custom jest reporter to capture console logs).
  • Then simply console.log() a html string and it will appear in the inspector.

An example usage

Logging the entire body content after rendering a component.

import { render } from '@testing-library/react';

test('should work', () => {
    render(<App />);
    console.log(document.body.innerHtml); // this html will appear in jest tools
});

Contributors

Thanks goes to these wonderful people (emoji key):


Raathi Kugarajan

💻 📖 🤔 🚇 🚧

This project follows the all-contributors specification. Contributions of any kind welcome!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft