Skip to content

Commit

Permalink
Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Raathigesh committed Aug 9, 2021
1 parent 4850aaa commit 8aac797
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,4 @@
<img src="https://raw.githubusercontent.com/Raathigesh/Jest-tools/main/icons/Github%20banner.png">

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.](https://marketplace.visualstudio.com/items?itemName=Raathigeshan.jest-tools)
- 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.

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

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

### Contributors

Expand Down

0 comments on commit 8aac797

Please sign in to comment.