0.2.1-alpha.0 • Published 4 years ago

jest-preview v0.2.1-alpha.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

All Contributors

npm npm

PRs Welcome Discord

Why jest-preview

When writing tests using Jest, we usually debug by reading the HTML code. Sometimes, the HTML is too complicated to visualize the UI in our head. jest-preview initiates a server and serve your HTML in a browser, then you can see your actual UI visually, which helps you debug jest tests faster.

jest-preview is initially designed to work with jest and react-testing-library. The package is framework-agnostic, and you can use it with any testing libraries.

Features

How to use jest-preview in 2 lines of code

+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();
  });
});

Examples

Installation

See the Installation Guide on Jest Preview official website.

Usage

See the Usage Guide on Jest Preview official website.

Advanced configurations

Jest Preview comes with Pre-configured transformation. However, in more advanced use cases where you have custom code transformation, check out the Code Transformation Guide.

Upcoming features

  • Support more css-in-js libraries.
  • Multiple preview.
  • You name it.

Contributing

We can't wait to see your contributions. See the Contribution Guide at CONTRIBUTING.md

Contributors ✨

Thanks goes to these wonderful people (emoji key):

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

License

This is open source software

MIT

0.3.2-alpha.1

3 years ago

0.3.2-alpha.0

3 years ago

0.3.0

3 years ago

0.3.1

3 years ago

0.3.1-alpha.0

3 years ago

0.3.1-alpha.1

3 years ago

0.2.3-alpha.1

4 years ago

0.2.3-alpha.0

4 years ago

0.2.5-alpha.1

4 years ago

0.2.5-alpha.0

4 years ago

0.2.1-alpha.2

4 years ago

0.2.1-alpha.3

4 years ago

0.2.1-alpha.0

4 years ago

0.2.1-alpha.1

4 years ago

0.2.8-alpha.0

3 years ago

0.2.6-alpha.0

4 years ago

0.2.4-alpha.2

4 years ago

0.2.4-alpha.1

4 years ago

0.2.4-alpha.0

4 years ago

0.2.2-alpha.0

4 years ago

0.2.1

4 years ago

0.2.7

3 years ago

0.2.6

4 years ago

0.2.8

3 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.2.5

4 years ago

0.2.4

4 years ago

0.2.0-alpha.0

4 years ago

0.1.7-alpha.0

4 years ago

0.2.0-alpha.2

4 years ago

0.2.0-alpha.1

4 years ago

0.1.5-alpha.0

4 years ago

0.1.6-alpha.0

4 years ago

0.2.0

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.4-alpha.0

4 years ago

0.1.3

4 years ago

0.1.3-alpha.6

4 years ago

0.1.3-alpha.5

4 years ago

0.1.3-alpha.4

4 years ago

0.1.3-alpha.3

4 years ago

0.1.3-alpha.2

4 years ago

0.1.3-alpha.1

4 years ago

0.1.3-alpha.0

4 years ago

0.1.2

4 years ago

0.1.2-alpha.0

4 years ago

0.1.1

4 years ago

0.1.1-alpha.0

4 years ago

0.1.0

4 years ago

0.1.0-alpha.1

4 years ago

0.1.0-alpha.0

4 years ago

0.0.3

4 years ago

0.0.3-alpha.0

4 years ago

0.0.2

4 years ago

0.0.2-alpha.0

4 years ago

0.0.1

4 years ago

0.0.1-alpha.1

4 years ago

0.0.1-alpha.0

4 years ago