Gathering detailed insights and metrics for pretty-format-snabbdom
Gathering detailed insights and metrics for pretty-format-snabbdom
Gathering detailed insights and metrics for pretty-format-snabbdom
Gathering detailed insights and metrics for pretty-format-snabbdom
npm install pretty-format-snabbdom
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
6 Stars
14 Commits
1 Forks
3 Watching
15 Branches
1 Contributors
Updated on 10 Mar 2023
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
43.1%
146
Compared to previous day
Last week
18.4%
681
Compared to previous week
Last month
12.2%
3,750
Compared to previous month
Last year
-6.2%
34,697
Compared to previous year
1
24
pretty-format (Jest snapshot) plugin for snabbdom VNodes
Jest snapshots have greatly simplified testing the VDOM output of React components. If your application is based on the snabbdom virtual DOM implementation (like e.g. Cycle.js apps), you were previously out of luck, because snapshotting snabbdom VNodes would result in huge object descriptions that were hard to read.
pretty-format-snabbdom makes Jest snapshots of snabbdom VNodes look just as pretty as those of React elements, using pretty-formats plugin system.
1npm install --save-dev pretty-format-snabbdom
Register in your .jestrc
:
1{ 2 "snapshotSerializers": ["pretty-format-snabbdom"] 3}
1import prettyFormatSnabbdom from 'pretty-format-snabbdom'; 2expect.addSnapshotSerializer(prettyFormatSnabbdom);
Object {
"children": Array [],
"data": Object {
"data": Object {
"stuff": "stuff",
},
"ns": undefined,
"props": Object {
"className": "cl",
"id": "id",
"onclick": [Function],
"title": "title",
},
"style": "color: black;",
},
"key": undefined,
"sel": "div",
}
<div
style="color: black;"
data={
Object {
"stuff": "stuff",
}
}
id="id"
className="cl"
title="title"
onclick={[Function]}
/>
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/10 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
50 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More