Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/douglasduteil/hyperhtml-serializer
Jest snapshot serializer that beautifies hyperHTML snapshots.
https://github.com/douglasduteil/hyperhtml-serializer
hyperhtml jest serializer snapshot testing
Last synced: about 1 month ago
JSON representation
Jest snapshot serializer that beautifies hyperHTML snapshots.
- Host: GitHub
- URL: https://github.com/douglasduteil/hyperhtml-serializer
- Owner: douglasduteil
- Created: 2018-07-13T15:06:55.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-10-24T16:39:19.000Z (2 months ago)
- Last Synced: 2024-10-26T07:01:29.594Z (about 2 months ago)
- Topics: hyperhtml, jest, serializer, snapshot, testing
- Language: JavaScript
- Homepage:
- Size: 1.49 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# hyperhtml-serializer
[![CI][gha-image]][gha-url]
[![NPM version][npm-image]][npm-url]
[![Conventional Commits][conventional-commits-image]][conventional-commits-url]
[![codecov][codecov-image]][codecov-url]> [Jest](https://github.com/facebook/jest) snapshot serializer that beautifies [hyperHTML](https://github.com/WebReflection/hyperHTML) snapshots.
## Note
**This version is working with `hyperhtml` version `>=2.19`**
For [`[email protected] - 2.18` versions consult the `1.x` branch](https://github.com/douglasduteil/hyperhtml-serializer/tree/1.x)## Why ?
This serializer it made to remove :
- hyperHTML `_hyper` comments like ``
Before :
```js
Hello hyperHTML !
Hello world !
```
After :
```js
Hello hyperHTML !
Hello world !
```
## Install
```sh
$ npm install --save-dev hyperhtml-serializer
# or
$ yarn add -D hyperhtml-serializer
```## Usage
Add in your `package.json`.
```json
{
"jest": {
"snapshotSerializers": ["hyperhtml-serializer"]
}
}
```## License
Copyright © 2018 Douglas Duteil
This work is free. You can redistribute it and/or modify it under the
terms of the Do What The Fuck You Want To Public License, Version 2,
as published by Sam Hocevar. See the LICENCE file for more details.[codecov-url]: https://codecov.io/gh/douglasduteil/hyperhtml-serializer
[codecov-image]: https://codecov.io/gh/douglasduteil/hyperhtml-serializer/branch/master/graph/badge.svg?token=ErvTZOUIxp
[npm-url]: https://npmjs.org/package/hyperhtml-serializer
[npm-image]: http://img.shields.io/npm/v/hyperhtml-serializer.svg
[gha-url]: https://github.com/douglasduteil/hyperhtml-serializer/actions/workflows/ci.yml
[gha-image]: https://github.com/douglasduteil/hyperhtml-serializer/actions/workflows/ci.yml/badge.svg
[conventional-commits-image]: https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg
[conventional-commits-url]: https://conventionalcommits.org*