Ships a working MV3 extension, but carries 31.57 MB of avoidable bloat and 5257 review blockers to resolve.
Salesforce Flow Extension
1.1.11Release risks
Grouped Issues
9457 grouped issues
Grouped issues, not occurrences
Current Size
32.53 MB
Projected Size
959.4 KB
Projected reduction
31.57 MB
97%
Report created
Sep 10, 2026
11:09 UTC / a7a1c5f5
Top Next Action
Open release risksSection 04
Build Hygiene Findings
Review Build Hygiene Checks for shipped release-review cleanup, packaging, and Text Asset Minification evidence.
- Build Hygiene Checks
- 9
- Affected Files
- 1695
- Occurrences
- 2426
Build Hygiene Check
- Rule ID
- hygiene/dev-dependency-leakage
- Severity
- Medium
- Confidence
- Medium confidence
- Affected files
- 156 affected files
- Occurrences
- 156 occurrences
Scope summary
Artifact metadata is shown without exposing file contents by default.
Review guidance
Exclude development-only packages and artifacts from the production bundle.
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1088 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 841 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1088 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 163 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 2349 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1088 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 741 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1088 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 355 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 802 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1088 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 320 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 756 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1088 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 915 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1088 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 740 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1088 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 3030 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 2264 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1088 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 129 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 651 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1088 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 784 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1088 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 859 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1088 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 848 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1088 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1379 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1088 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 949 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 894 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1088 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 546 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1472 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 4871 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 4606 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 801 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 2046 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 3731 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1016 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 14 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1210 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 5398 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 2485 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 11688 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 6974 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 950 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 954 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 14468 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 11253 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 7683 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1731 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1171 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 2098 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1065 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 674 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 2750 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1821 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 418 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1429 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 2338 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 3390 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 911 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1357 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 745 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1745 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 616 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 640 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 2864 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1805 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 2577 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 901 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1679 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1678 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1162 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 2943 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 3921 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 11309 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1602 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 14 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 453 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 19741 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 14038 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 14 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 2055 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 2201 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 818 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 6682 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 14 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 14315 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1952 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1096 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 14 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 2963 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 614 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 15845 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 4873 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 3073 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 359 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1180 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 18326 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 2521 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 6722 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 11163 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 6480 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 5677 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 7324 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 5066 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 2377 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 4197 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 2159 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 2242 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 4737 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 7124 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1102 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 8877 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 2930 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 939 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 2177 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 3381 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 14 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 2040 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 2226 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1979 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 2380 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 425 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 375 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 14 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1925 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 4759 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 6077 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1030 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 14 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 2793 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 8865 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 30828 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 2609 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 7727 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 1054 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 3165 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 4520 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 14 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 14 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 14 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 14 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 14 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 14 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 29697 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 14 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 324 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 614 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Matched signature: jest
- Artifact type
- dev dependency
- Signature label
- Matched signature: jest
- Byte size
- 962 B
- Attribution state
- Attribution state unavailable
- Contents
- Contents hidden
Build Hygiene Check
- Rule ID
- hygiene/test-leakage
- Severity
- Medium
- Confidence
- Medium confidence
- Affected files
- 30 affected files
- Occurrences
- 485 occurrences
Scope summary
Bundle-line references and matched-line emphasis are preserved for each emitted occurrence.
Review guidance
Remove test-only files and fixtures from the production bundle.
describe('AIProviders', () => { describe('buildRequest', () => { const args = { model: '', apiKey: 'test-key', systemPrompt: 'You are an expert.', userText: 'Explain this flow', temperature: 0.3 }; test('OpenAI chat-completions models use the chat endpoint with bearer auth', () => { const request = AIProviders.PROVIDERS.openai.buildRequest({ ...args, model: ...
Code excerptlines 27-219, bytes 701-8744 describe('AIProviders', () => { describe('buildRequest', () => { const args = { model: '', apiKey: 'test-key', systemPrompt: 'You are an expert.', userText: 'Explain this flow', temperature: 0.3 }; test('OpenAI chat-completions models use the chat endpoint with bearer auth', () => { const request = AIProviders.PROVIDERS.openai.buildRequest({ ...args, model: ...describe('buildRequest', () => { const args = { model: '', apiKey: 'test-key', systemPrompt: 'You are an expert.', userText: 'Explain this flow', temperature: 0.3 }; test('OpenAI chat-completions models use the chat endpoint with bearer auth', () => { const request = AIProviders.PROVIDERS.openai.buildRequest({ ...args, model: 'gpt-4o' }); expect(reques...
Code excerptlines 29-82, bytes 736-3356 describe('buildRequest', () => { const args = { model: '', apiKey: 'test-key', systemPrompt: 'You are an expert.', userText: 'Explain this flow', temperature: 0.3 }; test('OpenAI chat-completions models use the chat endpoint with bearer auth', () => { const request = AIProviders.PROVIDERS.openai.buildRequest({ ...args, model: 'gpt-4o' }); expect(reques...test('OpenAI chat-completions models use the chat endpoint with bearer auth', () => { const request = AIProviders.PROVIDERS.openai.buildRequest({ ...args, model: 'gpt-4o' }); expect(request.url).toBe('https://api.openai.com/v1/chat/completions'); expect(request.headers.Authorization).toBe('Bearer test-key'); expect(request.body.stream).toBe(true); expect(request....
Code excerptlines 36-44, bytes 933-1417 test('OpenAI chat-completions models use the chat endpoint with bearer auth', () => { const request = AIProviders.PROVIDERS.openai.buildRequest({ ...args, model: 'gpt-4o' }); expect(request.url).toBe('https://api.openai.com/v1/chat/completions'); expect(request.headers.Authorization).toBe('Bearer test-key'); expect(request.body.stream).toBe(true); expect(request....test('OpenAI gpt-5 models use the responses endpoint with temperature 1', () => { const request = AIProviders.PROVIDERS.openai.buildRequest({ ...args, model: 'gpt-5-mini' }); expect(request.url).toBe('https://api.openai.com/v1/responses'); expect(request.body.temperature).toBe(1); expect(request.body.input).toContain('You are an expert.'); expect(request.body.str...
Code excerptlines 46-53, bytes 1424-1843 test('OpenAI gpt-5 models use the responses endpoint with temperature 1', () => { const request = AIProviders.PROVIDERS.openai.buildRequest({ ...args, model: 'gpt-5-mini' }); expect(request.url).toBe('https://api.openai.com/v1/responses'); expect(request.body.temperature).toBe(1); expect(request.body.input).toContain('You are an expert.'); expect(request.body.str...test('Anthropic uses the messages endpoint with browser-access headers', () => { const request = AIProviders.PROVIDERS.anthropic.buildRequest({ ...args, model: 'claude-sonnet-4-6' }); expect(request.url).toBe('https://api.anthropic.com/v1/messages'); expect(request.headers['x-api-key']).toBe('test-key'); expect(request.headers['anthropic-version']).toBe('2023-06-01'); ...
Code excerptlines 55-64, bytes 1850-2449 test('Anthropic uses the messages endpoint with browser-access headers', () => { const request = AIProviders.PROVIDERS.anthropic.buildRequest({ ...args, model: 'claude-sonnet-4-6' }); expect(request.url).toBe('https://api.anthropic.com/v1/messages'); expect(request.headers['x-api-key']).toBe('test-key'); expect(request.headers['anthropic-version']).toBe('2023-06-01'); ...test('Gemini uses the streaming SSE endpoint with the key in a header', () => { const request = AIProviders.PROVIDERS.gemini.buildRequest({ ...args, model: 'gemini-2.5-flash' }); expect(request.url).toBe('https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:streamGenerateContent?alt=sse'); expect(request.headers['x-goog-api-key']).toBe('test-key'); ...
Code excerptlines 66-72, bytes 2456-2939 test('Gemini uses the streaming SSE endpoint with the key in a header', () => { const request = AIProviders.PROVIDERS.gemini.buildRequest({ ...args, model: 'gemini-2.5-flash' }); expect(request.url).toBe('https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:streamGenerateContent?alt=sse'); expect(request.headers['x-goog-api-key']).toBe('test-key'); ...test('Ollama targets localhost and needs no key', () => { const request = AIProviders.PROVIDERS.ollama.buildRequest({ ...args, model: 'llama3.2' }); expect(request.url).toBe('http://localhost:11434/api/chat'); expect(AIProviders.PROVIDERS.ollama.requiresKey).toBe(false); expect(request.headers.Authorization).toBeUndefined(); expect(request.body.stream).toBe(true)...
Code excerptlines 74-81, bytes 2946-3350 test('Ollama targets localhost and needs no key', () => { const request = AIProviders.PROVIDERS.ollama.buildRequest({ ...args, model: 'llama3.2' }); expect(request.url).toBe('http://localhost:11434/api/chat'); expect(AIProviders.PROVIDERS.ollama.requiresKey).toBe(false); expect(request.headers.Authorization).toBeUndefined(); expect(request.body.stream).toBe(true)...\n});describe('extractDelta', () => { test('OpenAI handles both chat-completions and responses chunks', () => { const { openai } = AIProviders.PROVIDERS; expect(openai.extractDelta({ choices: [{ delta: { content: 'abc' } }] })).toBe('abc'); expect(openai.extractDelta({ type: 'response.output_text.delta', delta: 'xyz' })).toBe('xyz'); expect(openai.extractDelta({ choices: [...
Code excerptlines 84-109, bytes 3361-4634 describe('extractDelta', () => { test('OpenAI handles both chat-completions and responses chunks', () => { const { openai } = AIProviders.PROVIDERS; expect(openai.extractDelta({ choices: [{ delta: { content: 'abc' } }] })).toBe('abc'); expect(openai.extractDelta({ type: 'response.output_text.delta', delta: 'xyz' })).toBe('xyz'); expect(openai.extractDelta({ choices: [...test('OpenAI handles both chat-completions and responses chunks', () => { const { openai } = AIProviders.PROVIDERS; expect(openai.extractDelta({ choices: [{ delta: { content: 'abc' } }] })).toBe('abc'); expect(openai.extractDelta({ type: 'response.output_text.delta', delta: 'xyz' })).toBe('xyz'); expect(openai.extractDelta({ choices: [{ delta: {} }] })).toBeNull(); ...
Code excerptlines 85-90, bytes 3398-3796 describe('extractDelta', () => {\ntest('OpenAI handles both chat-completions and responses chunks', () => { const { openai } = AIProviders.PROVIDERS; expect(openai.extractDelta({ choices: [{ delta: { content: 'abc' } }] })).toBe('abc'); expect(openai.extractDelta({ type: 'response.output_text.delta', delta: 'xyz' })).toBe('xyz'); expect(openai.extractDelta({ choices: [{ delta: {} }] })).toBeNull(); ...test('Anthropic extracts content_block_delta text', () => { const { anthropic } = AIProviders.PROVIDERS; expect(anthropic.extractDelta({ type: 'content_block_delta', delta: { text: 'hi' } })).toBe('hi'); expect(anthropic.extractDelta({ type: 'message_start' })).toBeNull(); });
Code excerptlines 92-96, bytes 3803-4101 test('Anthropic extracts content_block_delta text', () => { const { anthropic } = AIProviders.PROVIDERS; expect(anthropic.extractDelta({ type: 'content_block_delta', delta: { text: 'hi' } })).toBe('hi'); expect(anthropic.extractDelta({ type: 'message_start' })).toBeNull(); });test('Gemini extracts candidate part text', () => { const { gemini } = AIProviders.PROVIDERS; expect(gemini.extractDelta({ candidates: [{ content: { parts: [{ text: 'g' }] } }] })).toBe('g'); expect(gemini.extractDelta({})).toBeNull(); });
Code excerptlines 98-102, bytes 4108-4368 test('Gemini extracts candidate part text', () => { const { gemini } = AIProviders.PROVIDERS; expect(gemini.extractDelta({ candidates: [{ content: { parts: [{ text: 'g' }] } }] })).toBe('g'); expect(gemini.extractDelta({})).toBeNull(); });test('Ollama extracts message content', () => { const { ollama } = AIProviders.PROVIDERS; expect(ollama.extractDelta({ message: { content: 'o' }, done: false })).toBe('o'); expect(ollama.extractDelta({ done: true })).toBeNull(); });
Code excerptlines 104-108, bytes 4375-4628 test('Ollama extracts message content', () => { const { ollama } = AIProviders.PROVIDERS; expect(ollama.extractDelta({ message: { content: 'o' }, done: false })).toBe('o'); expect(ollama.extractDelta({ done: true })).toBeNull(); });\n});describe('streamChat', () => { afterEach(() => { delete global.fetch; }); test('accumulates SSE deltas and reports them via onDelta', async () => { global.fetch = jest.fn(async () => fakeStreamResponse([ 'data: {"choices":[{"delta":{"content":"Hello"}}]}\n', 'data: {"choices":[{"delta":{"content":" world"}}]}\ndata: [DONE]\n' ])); const deltas...
Code excerptlines 111-218, bytes 4639-8740 describe('streamChat', () => { afterEach(() => { delete global.fetch; }); test('accumulates SSE deltas and reports them via onDelta', async () => { global.fetch = jest.fn(async () => fakeStreamResponse([ 'data: {"choices":[{"delta":{"content":"Hello"}}]}\n', 'data: {"choices":[{"delta":{"content":" world"}}]}\ndata: [DONE]\n' ])); const deltas...\n});afterEach(() => { delete global.fetch; });
Code excerptlines 112-114, bytes 4674-4725 describe('streamChat', () => {\nafterEach(() => { delete global.fetch; });test('accumulates SSE deltas and reports them via onDelta', async () => { global.fetch = jest.fn(async () => fakeStreamResponse([ 'data: {"choices":[{"delta":{"content":"Hello"}}]}\n', 'data: {"choices":[{"delta":{"content":" world"}}]}\ndata: [DONE]\n' ])); const deltas = []; const fullText = await AIProviders.streamChat({ provider: 'openai', m...
Code excerptlines 116-131, bytes 4732-5420 test('accumulates SSE deltas and reports them via onDelta', async () => { global.fetch = jest.fn(async () => fakeStreamResponse([ 'data: {"choices":[{"delta":{"content":"Hello"}}]}\n', 'data: {"choices":[{"delta":{"content":" world"}}]}\ndata: [DONE]\n' ])); const deltas = []; const fullText = await AIProviders.streamChat({ provider: 'openai', m...global.fetch = jest.fn(async () => fakeStreamResponse([ 'data: {"choices":[{"delta":{"content":"Hello"}}]}\n', 'data: {"choices":[{"delta":{"content":" world"}}]}\ndata: [DONE]\n' ]));
Code excerptlines 117-120, bytes 4827-5017 test('accumulates SSE deltas and reports them via onDelta', async () => {\nglobal.fetch = jest.fn(async () => fakeStreamResponse([ 'data: {"choices":[{"delta":{"content":"Hello"}}]}\n', 'data: {"choices":[{"delta":{"content":" world"}}]}\ndata: [DONE]\n' ]));\nconst deltas = [];test('parses SSE chunks split across network reads', async () => { global.fetch = jest.fn(async () => fakeStreamResponse([ 'data: {"choices":[{"delta":{"con', 'tent":"AB"}}]}\n' ])); const fullText = await AIProviders.streamChat({ provider: 'openai', model: 'gpt-4o', apiKey: 'k', systemPrompt: 's', userText: 'u', temperature: 0.3 }); ...
Code excerptlines 133-145, bytes 5427-5862 test('parses SSE chunks split across network reads', async () => { global.fetch = jest.fn(async () => fakeStreamResponse([ 'data: {"choices":[{"delta":{"con', 'tent":"AB"}}]}\n' ])); const fullText = await AIProviders.streamChat({ provider: 'openai', model: 'gpt-4o', apiKey: 'k', systemPrompt: 's', userText: 'u', temperature: 0.3 }); ...global.fetch = jest.fn(async () => fakeStreamResponse([ 'data: {"choices":[{"delta":{"con', 'tent":"AB"}}]}\n' ]));
Code excerptlines 134-137, bytes 5515-5636 test('parses SSE chunks split across network reads', async () => {\nglobal.fetch = jest.fn(async () => fakeStreamResponse([ 'data: {"choices":[{"delta":{"con', 'tent":"AB"}}]}\n' ]));test('parses Anthropic event/data SSE pairs', async () => { global.fetch = jest.fn(async () => fakeStreamResponse([ 'event: content_block_delta\ndata: {"type":"content_block_delta","delta":{"text":"An"}}\n', 'event: content_block_delta\ndata: {"type":"content_block_delta","delta":{"text":"thropic"}}\n', 'event: message_stop\ndata: {"type":"message_stop"}\n' ...
Code excerptlines 147-160, bytes 5869-6515 test('parses Anthropic event/data SSE pairs', async () => { global.fetch = jest.fn(async () => fakeStreamResponse([ 'event: content_block_delta\ndata: {"type":"content_block_delta","delta":{"text":"An"}}\n', 'event: content_block_delta\ndata: {"type":"content_block_delta","delta":{"text":"thropic"}}\n', 'event: message_stop\ndata: {"type":"message_stop"}\n' ...global.fetch = jest.fn(async () => fakeStreamResponse([ 'event: content_block_delta\ndata: {"type":"content_block_delta","delta":{"text":"An"}}\n', 'event: content_block_delta\ndata: {"type":"content_block_delta","delta":{"text":"thropic"}}\n', 'event: message_stop\ndata: {"type":"message_stop"}\n' ]));
Code excerptlines 148-152, bytes 5950-6268 test('parses Anthropic event/data SSE pairs', async () => {\nglobal.fetch = jest.fn(async () => fakeStreamResponse([ 'event: content_block_delta\ndata: {"type":"content_block_delta","delta":{"text":"An"}}\n', 'event: content_block_delta\ndata: {"type":"content_block_delta","delta":{"text":"thropic"}}\n', 'event: message_stop\ndata: {"type":"message_stop"}\n' ]));test('parses Ollama NDJSON lines without data prefixes', async () => { global.fetch = jest.fn(async () => fakeStreamResponse([ '{"message":{"content":"Ol"},"done":false}\n{"message":{"content":"lama"},"done":false}\n', '{"done":true}\n' ])); const fullText = await AIProviders.streamChat({ provider: 'ollama', model: 'llama3.2', systemPrompt: 's...
Code excerptlines 162-174, bytes 6522-7009 test('parses Ollama NDJSON lines without data prefixes', async () => { global.fetch = jest.fn(async () => fakeStreamResponse([ '{"message":{"content":"Ol"},"done":false}\n{"message":{"content":"lama"},"done":false}\n', '{"done":true}\n' ])); const fullText = await AIProviders.streamChat({ provider: 'ollama', model: 'llama3.2', systemPrompt: 's...global.fetch = jest.fn(async () => fakeStreamResponse([ '{"message":{"content":"Ol"},"done":false}\n{"message":{"content":"lama"},"done":false}\n', '{"done":true}\n' ]));
Code excerptlines 163-166, bytes 6614-6790 test('parses Ollama NDJSON lines without data prefixes', async () => {\nglobal.fetch = jest.fn(async () => fakeStreamResponse([ '{"message":{"content":"Ol"},"done":false}\n{"message":{"content":"lama"},"done":false}\n', '{"done":true}\n' ]));test('throws a labeled error on a non-ok response', async () => { global.fetch = jest.fn(async () => ({ ok: false, status: 401, text: async () => JSON.stringify({ error: { message: 'invalid api key' } }) })); await expect(AIProviders.streamChat({ provider: 'anthropic', model: 'claude-sonnet-4-6', apiKey: 'bad', systemPrompt: 's', userT...
Code excerptlines 176-187, bytes 7016-7523 test('throws a labeled error on a non-ok response', async () => { global.fetch = jest.fn(async () => ({ ok: false, status: 401, text: async () => JSON.stringify({ error: { message: 'invalid api key' } }) })); await expect(AIProviders.streamChat({ provider: 'anthropic', model: 'claude-sonnet-4-6', apiKey: 'bad', systemPrompt: 's', userT...global.fetch = jest.fn(async () => ({ ok: false, status: 401, text: async () => JSON.stringify({ error: { message: 'invalid api key' } }) }));
Code excerptlines 177-181, bytes 7103-7259 test('throws a labeled error on a non-ok response', async () => {\nglobal.fetch = jest.fn(async () => ({ ok: false, status: 401, text: async () => JSON.stringify({ error: { message: 'invalid api key' } }) }));test('stringifies structured error payloads instead of [object Object]', async () => { // Ollama rejects untrusted origins with 403 and a structured body global.fetch = jest.fn(async () => ({ ok: false, status: 403, text: async () => JSON.stringify({ error: { message: 'origin not allowed', code: 403 } }) })); await expect(AIProviders.streamChat(...
Code excerptlines 189-201, bytes 7530-8126 test('stringifies structured error payloads instead of [object Object]', async () => { // Ollama rejects untrusted origins with 403 and a structured body global.fetch = jest.fn(async () => ({ ok: false, status: 403, text: async () => JSON.stringify({ error: { message: 'origin not allowed', code: 403 } }) })); await expect(AIProviders.streamChat(...global.fetch = jest.fn(async () => ({ ok: false, status: 403, text: async () => JSON.stringify({ error: { message: 'origin not allowed', code: 403 } }) }));
Code excerptlines 191-195, bytes 7711-7881 // Ollama rejects untrusted origins with 403 and a structured body\nglobal.fetch = jest.fn(async () => ({ ok: false, status: 403, text: async () => JSON.stringify({ error: { message: 'origin not allowed', code: 403 } }) }));test('throws on mid-stream error events', async () => { global.fetch = jest.fn(async () => fakeStreamResponse([ 'data: {"type":"error","error":{"message":"overloaded"}}\n' ])); await expect(AIProviders.streamChat({ provider: 'anthropic', model: 'claude-sonnet-4-6', apiKey: 'k', systemPrompt: 's', userText: 'u', temperature: 0.3 })).rejects.toThr...
Code excerptlines 203-212, bytes 8133-8553 test('throws on mid-stream error events', async () => { global.fetch = jest.fn(async () => fakeStreamResponse([ 'data: {"type":"error","error":{"message":"overloaded"}}\n' ])); await expect(AIProviders.streamChat({ provider: 'anthropic', model: 'claude-sonnet-4-6', apiKey: 'k', systemPrompt: 's', userText: 'u', temperature: 0.3 })).rejects.toThr...global.fetch = jest.fn(async () => fakeStreamResponse([ 'data: {"type":"error","error":{"message":"overloaded"}}\n' ]));
Code excerptlines 204-206, bytes 8210-8328 test('throws on mid-stream error events', async () => {\nglobal.fetch = jest.fn(async () => fakeStreamResponse([ 'data: {"type":"error","error":{"message":"overloaded"}}\n' ]));test('rejects unknown providers', async () => { await expect(AIProviders.streamChat({ provider: 'nope' })) .rejects.toThrow('Unknown AI provider: nope'); });
Code excerptlines 214-217, bytes 8560-8734 test('rejects unknown providers', async () => { await expect(AIProviders.streamChat({ provider: 'nope' })) .rejects.toThrow('Unknown AI provider: nope'); });\n});
describe('Model Detection and API Logic', () => { // Helper function to simulate the model detection logic function isGPT5Model(model) { return !!(model && typeof model === 'string' && model.trim().length > 0 && model.toLowerCase().startsWith('gpt-5')); } // Helper function to get the correct token parameter function getTokenLimitParam(model) { return isGPT5Model(model) ? 'max_o...
Code excerptlines 3-208, bytes 44-7596 describe('Model Detection and API Logic', () => { // Helper function to simulate the model detection logic function isGPT5Model(model) { return !!(model && typeof model === 'string' && model.trim().length > 0 && model.toLowerCase().startsWith('gpt-5')); } // Helper function to get the correct token parameter function getTokenLimitParam(model) { return isGPT5Model(model) ? 'max_o...describe('Model Detection', () => { test('should detect GPT-5 models correctly', () => { expect(isGPT5Model('gpt-5-nano')).toBe(true); expect(isGPT5Model('gpt-5-mini')).toBe(true); expect(isGPT5Model('GPT-5-Large')).toBe(true); expect(isGPT5Model('gpt-5')).toBe(true); }); test('should not detect non-GPT-5 models as GPT-5', () => { expect(isGPT5Model('gp...
Code excerptlines 58-73, bytes 1823-2477 describe('Model Detection', () => { test('should detect GPT-5 models correctly', () => { expect(isGPT5Model('gpt-5-nano')).toBe(true); expect(isGPT5Model('gpt-5-mini')).toBe(true); expect(isGPT5Model('GPT-5-Large')).toBe(true); expect(isGPT5Model('gpt-5')).toBe(true); }); test('should not detect non-GPT-5 models as GPT-5', () => { expect(isGPT5Model('gp...test('should detect GPT-5 models correctly', () => { expect(isGPT5Model('gpt-5-nano')).toBe(true); expect(isGPT5Model('gpt-5-mini')).toBe(true); expect(isGPT5Model('GPT-5-Large')).toBe(true); expect(isGPT5Model('gpt-5')).toBe(true); });
Code excerptlines 59-64, bytes 1863-2126 describe('Model Detection', () => {\ntest('should detect GPT-5 models correctly', () => { expect(isGPT5Model('gpt-5-nano')).toBe(true); expect(isGPT5Model('gpt-5-mini')).toBe(true); expect(isGPT5Model('GPT-5-Large')).toBe(true); expect(isGPT5Model('gpt-5')).toBe(true); });test('should not detect non-GPT-5 models as GPT-5', () => { expect(isGPT5Model('gpt-4o')).toBe(false); expect(isGPT5Model('gpt-4-turbo')).toBe(false); expect(isGPT5Model('gpt-3.5-turbo')).toBe(false); expect(isGPT5Model('claude-3-sonnet')).toBe(false); expect(isGPT5Model('custom-model')).toBe(false); });
Code excerptlines 66-72, bytes 2133-2471 test('should not detect non-GPT-5 models as GPT-5', () => { expect(isGPT5Model('gpt-4o')).toBe(false); expect(isGPT5Model('gpt-4-turbo')).toBe(false); expect(isGPT5Model('gpt-3.5-turbo')).toBe(false); expect(isGPT5Model('claude-3-sonnet')).toBe(false); expect(isGPT5Model('custom-model')).toBe(false); });\n});describe('Salesforce API Version Selection', () => { // mirrors getLatestAPIVersion in content.js: pick the last (highest) // version from /services/data/, fall back to the pinned default const DEFAULT_API_VERSION = 'v57.0'; function pickLatestVersion(versions) { if (Array.isArray(versions) && versions.length > 0) { return 'v' + versions[versions.length - 1].version...
Code excerptlines 75-100, bytes 2482-3563 describe('Salesforce API Version Selection', () => { // mirrors getLatestAPIVersion in content.js: pick the last (highest) // version from /services/data/, fall back to the pinned default const DEFAULT_API_VERSION = 'v57.0'; function pickLatestVersion(versions) { if (Array.isArray(versions) && versions.length > 0) { return 'v' + versions[versions.length - 1].version...test('should pick the last version from /services/data/', () => { const versions = [ { version: '61.0', label: 'Summer \'24' }, { version: '62.0', label: 'Winter \'25' }, { version: '63.0', label: 'Spring \'25' } ]; expect(pickLatestVersion(versions)).toBe('v63.0'); });
Code excerptlines 86-93, bytes 2935-3250 test('should pick the last version from /services/data/', () => { const versions = [ { version: '61.0', label: 'Summer \'24' }, { version: '62.0', label: 'Winter \'25' }, { version: '63.0', label: 'Spring \'25' } ]; expect(pickLatestVersion(versions)).toBe('v63.0'); });test('should fall back to the default when response is empty or invalid', () => { expect(pickLatestVersion([])).toBe(DEFAULT_API_VERSION); expect(pickLatestVersion(null)).toBe(DEFAULT_API_VERSION); expect(pickLatestVersion({ error: 'unexpected' })).toBe(DEFAULT_API_VERSION); });
Code excerptlines 95-99, bytes 3257-3557 test('should fall back to the default when response is empty or invalid', () => { expect(pickLatestVersion([])).toBe(DEFAULT_API_VERSION); expect(pickLatestVersion(null)).toBe(DEFAULT_API_VERSION); expect(pickLatestVersion({ error: 'unexpected' })).toBe(DEFAULT_API_VERSION); });\n});describe('API Parameters', () => { test('should use correct token parameter for GPT-5', () => { expect(getTokenLimitParam('gpt-5-nano')).toBe('max_output_tokens'); expect(getTokenLimitParam('gpt-5-mini')).toBe('max_output_tokens'); }); test('should use correct token parameter for non-GPT-5', () => { expect(getTokenLimitParam('gpt-4o')).toBe('max_tokens'); exp...
Code excerptlines 102-129, bytes 3568-4797 describe('API Parameters', () => { test('should use correct token parameter for GPT-5', () => { expect(getTokenLimitParam('gpt-5-nano')).toBe('max_output_tokens'); expect(getTokenLimitParam('gpt-5-mini')).toBe('max_output_tokens'); }); test('should use correct token parameter for non-GPT-5', () => { expect(getTokenLimitParam('gpt-4o')).toBe('max_tokens'); exp...test('should use correct token parameter for GPT-5', () => { expect(getTokenLimitParam('gpt-5-nano')).toBe('max_output_tokens'); expect(getTokenLimitParam('gpt-5-mini')).toBe('max_output_tokens'); });
Code excerptlines 103-106, bytes 3607-3822 describe('API Parameters', () => {\ntest('should use correct token parameter for GPT-5', () => { expect(getTokenLimitParam('gpt-5-nano')).toBe('max_output_tokens'); expect(getTokenLimitParam('gpt-5-mini')).toBe('max_output_tokens'); });test('should use correct token parameter for non-GPT-5', () => { expect(getTokenLimitParam('gpt-4o')).toBe('max_tokens'); expect(getTokenLimitParam('gpt-4-turbo')).toBe('max_tokens'); expect(getTokenLimitParam('claude-3-sonnet')).toBe('max_tokens'); });
Code excerptlines 108-112, bytes 3829-4103 test('should use correct token parameter for non-GPT-5', () => { expect(getTokenLimitParam('gpt-4o')).toBe('max_tokens'); expect(getTokenLimitParam('gpt-4-turbo')).toBe('max_tokens'); expect(getTokenLimitParam('claude-3-sonnet')).toBe('max_tokens'); });test('should use temperature = 1 for GPT-5 models', () => { expect(getModelTemperature('gpt-5-nano')).toBe(1); expect(getModelTemperature('gpt-5-mini')).toBe(1); });
Code excerptlines 114-117, bytes 4110-4290 test('should use temperature = 1 for GPT-5 models', () => { expect(getModelTemperature('gpt-5-nano')).toBe(1); expect(getModelTemperature('gpt-5-mini')).toBe(1); });test('should use default temperature for non-GPT-5 models', () => { expect(getModelTemperature('gpt-4o')).toBe(0.3); expect(getModelTemperature('gpt-4-turbo')).toBe(0.3); expect(getModelTemperature('claude-3-sonnet')).toBe(0.3); });
Code excerptlines 119-123, bytes 4297-4550 test('should use default temperature for non-GPT-5 models', () => { expect(getModelTemperature('gpt-4o')).toBe(0.3); expect(getModelTemperature('gpt-4-turbo')).toBe(0.3); expect(getModelTemperature('claude-3-sonnet')).toBe(0.3); });test('should use correct API endpoints', () => { expect(getApiEndpoint('gpt-5-nano')).toBe('https://api.openai.com/v1/responses'); expect(getApiEndpoint('gpt-4o')).toBe('https://api.openai.com/v1/chat/completions'); });
Code excerptlines 125-128, bytes 4557-4791 test('should use correct API endpoints', () => { expect(getApiEndpoint('gpt-5-nano')).toBe('https://api.openai.com/v1/responses'); expect(getApiEndpoint('gpt-4o')).toBe('https://api.openai.com/v1/chat/completions'); });\n});describe('Payload Generation', () => { const testPrompt = 'Explain this flow:'; const testData = 'Sample flow data'; const systemPrompt = 'You are a Salesforce flow expert.'; test('should generate correct payload for GPT-5 models', () => { const payload = buildPayload('gpt-5-nano', testPrompt, testData, systemPrompt); expect(payload).toEqual({ model: '...
Code excerptlines 131-183, bytes 4802-6729 describe('Payload Generation', () => { const testPrompt = 'Explain this flow:'; const testData = 'Sample flow data'; const systemPrompt = 'You are a Salesforce flow expert.'; test('should generate correct payload for GPT-5 models', () => { const payload = buildPayload('gpt-5-nano', testPrompt, testData, systemPrompt); expect(payload).toEqual({ model: '...test('should generate correct payload for GPT-5 models', () => { const payload = buildPayload('gpt-5-nano', testPrompt, testData, systemPrompt); expect(payload).toEqual({ model: 'gpt-5-nano', input: `${systemPrompt}\n\n${testPrompt} ${testData}`, temperature: 1, max_output_tokens: 2000 }); // Should not have chat completion parame...
Code excerptlines 136-151, bytes 4994-5607 test('should generate correct payload for GPT-5 models', () => { const payload = buildPayload('gpt-5-nano', testPrompt, testData, systemPrompt); expect(payload).toEqual({ model: 'gpt-5-nano', input: `${systemPrompt}\n\n${testPrompt} ${testData}`, temperature: 1, max_output_tokens: 2000 }); // Should not have chat completion parame...test('should generate correct payload for non-GPT-5 models', () => { const payload = buildPayload('gpt-4o', testPrompt, testData, systemPrompt); expect(payload).toEqual({ model: 'gpt-4o', messages: [ { role: 'system', content: [{ type: 'text', text: systemPrompt }] }, { role: 'user', content: [{ type: 'text', text: `${testPrompt} ${testDat...
Code excerptlines 153-172, bytes 5614-6321 test('should generate correct payload for non-GPT-5 models', () => { const payload = buildPayload('gpt-4o', testPrompt, testData, systemPrompt); expect(payload).toEqual({ model: 'gpt-4o', messages: [ { role: 'system', content: [{ type: 'text', text: systemPrompt }] }, { role: 'user', content: [{ type: 'text', text: `${testPrompt} ${testDat...test('should handle custom models as non-GPT-5', () => { const payload = buildPayload('claude-3-sonnet', testPrompt, testData, systemPrompt); expect(payload.model).toBe('claude-3-sonnet'); expect(payload.messages).toBeDefined(); expect(payload.temperature).toBe(0.3); expect(payload.max_tokens).toBe(2000); expect(payload.input).toBeUndefined(); });
Code excerptlines 174-182, bytes 6328-6723 test('should handle custom models as non-GPT-5', () => { const payload = buildPayload('claude-3-sonnet', testPrompt, testData, systemPrompt); expect(payload.model).toBe('claude-3-sonnet'); expect(payload.messages).toBeDefined(); expect(payload.temperature).toBe(0.3); expect(payload.max_tokens).toBe(2000); expect(payload.input).toBeUndefined(); });\n});describe('Edge Cases', () => { test('should handle empty model names', () => { expect(isGPT5Model('')).toBe(false); expect(isGPT5Model(null)).toBe(false); expect(isGPT5Model(undefined)).toBe(false); }); test('should handle case sensitivity', () => { expect(isGPT5Model('GPT-5-NANO')).toBe(true); expect(isGPT5Model('Gpt-5-Mini')).toBe(true); expect(...
Code excerptlines 185-207, bytes 6734-7592 describe('Edge Cases', () => { test('should handle empty model names', () => { expect(isGPT5Model('')).toBe(false); expect(isGPT5Model(null)).toBe(false); expect(isGPT5Model(undefined)).toBe(false); }); test('should handle case sensitivity', () => { expect(isGPT5Model('GPT-5-NANO')).toBe(true); expect(isGPT5Model('Gpt-5-Mini')).toBe(true); expect(...\n});test('should handle empty model names', () => { expect(isGPT5Model('')).toBe(false); expect(isGPT5Model(null)).toBe(false); expect(isGPT5Model(undefined)).toBe(false); });
Code excerptlines 186-190, bytes 6769-6961 describe('Edge Cases', () => {\ntest('should handle empty model names', () => { expect(isGPT5Model('')).toBe(false); expect(isGPT5Model(null)).toBe(false); expect(isGPT5Model(undefined)).toBe(false); });test('should handle case sensitivity', () => { expect(isGPT5Model('GPT-5-NANO')).toBe(true); expect(isGPT5Model('Gpt-5-Mini')).toBe(true); expect(isGPT5Model('gPt-5')).toBe(true); });
Code excerptlines 192-196, bytes 6968-7172 test('should handle case sensitivity', () => { expect(isGPT5Model('GPT-5-NANO')).toBe(true); expect(isGPT5Model('Gpt-5-Mini')).toBe(true); expect(isGPT5Model('gPt-5')).toBe(true); });test('should handle models that start with gpt-5 but have additional text', () => { expect(isGPT5Model('gpt-5-custom-version')).toBe(true); expect(isGPT5Model('gpt-5a')).toBe(true); });
Code excerptlines 198-201, bytes 7179-7379 test('should handle models that start with gpt-5 but have additional text', () => { expect(isGPT5Model('gpt-5-custom-version')).toBe(true); expect(isGPT5Model('gpt-5a')).toBe(true); });test('should not match models that contain but do not start with gpt-5', () => { expect(isGPT5Model('custom-gpt-5-model')).toBe(false); expect(isGPT5Model('new-gpt-5')).toBe(false); });
Code excerptlines 203-206, bytes 7386-7586 test('should not match models that contain but do not start with gpt-5', () => { expect(isGPT5Model('custom-gpt-5-model')).toBe(false); expect(isGPT5Model('new-gpt-5')).toBe(false); });\n});
describe('DOM Interactions', () => { // Mock DOM setup beforeEach(() => { document.body.innerHTML = ''; localStorage.clear(); sessionStorage.clear(); }); // Helper function to simulate model selection UI creation function createModelSelectionUI(savedModel = 'gpt-4o') { const container = document.createElement('div'); container.className = 'model-selection'; ...
Code excerptlines 3-274, bytes 49-10528 describe('DOM Interactions', () => { // Mock DOM setup beforeEach(() => { document.body.innerHTML = ''; localStorage.clear(); sessionStorage.clear(); }); // Helper function to simulate model selection UI creation function createModelSelectionUI(savedModel = 'gpt-4o') { const container = document.createElement('div'); container.className = 'model-selection'; ...beforeEach(() => { document.body.innerHTML = ''; localStorage.clear(); sessionStorage.clear(); });
Code excerptlines 5-9, bytes 108-219 // Mock DOM setup\nbeforeEach(() => { document.body.innerHTML = ''; localStorage.clear(); sessionStorage.clear(); });describe('Model Selection UI', () => { test('should create model selection UI with correct default selection', () => { const ui = createModelSelectionUI('gpt-4o'); document.body.appendChild(ui); const gpt4Radio = ui.querySelector('input[value="gpt-4o"]'); const gpt5Radio = ui.querySelector('input[value="gpt-5-nano"]'); const customRadio = ui.querySelector...
Code excerptlines 42-96, bytes 1786-3958 describe('Model Selection UI', () => { test('should create model selection UI with correct default selection', () => { const ui = createModelSelectionUI('gpt-4o'); document.body.appendChild(ui); const gpt4Radio = ui.querySelector('input[value="gpt-4o"]'); const gpt5Radio = ui.querySelector('input[value="gpt-5-nano"]'); const customRadio = ui.querySelector...test('should create model selection UI with correct default selection', () => { const ui = createModelSelectionUI('gpt-4o'); document.body.appendChild(ui); const gpt4Radio = ui.querySelector('input[value="gpt-4o"]'); const gpt5Radio = ui.querySelector('input[value="gpt-5-nano"]'); const customRadio = ui.querySelector('input[value="custom"]'); e...
Code excerptlines 43-54, bytes 1829-2360 describe('Model Selection UI', () => {\ntest('should create model selection UI with correct default selection', () => { const ui = createModelSelectionUI('gpt-4o'); document.body.appendChild(ui); const gpt4Radio = ui.querySelector('input[value="gpt-4o"]'); const gpt5Radio = ui.querySelector('input[value="gpt-5-nano"]'); const customRadio = ui.querySelector('input[value="custom"]'); e...test('should show custom input when custom model is selected', () => { const ui = createModelSelectionUI('claude-3-sonnet'); document.body.appendChild(ui); const customRadio = ui.querySelector('input[value="custom"]'); const customInput = ui.querySelector('.custom-model-input'); const customInputField = ui.querySelector('#custom-model-name'); e...
Code excerptlines 56-67, bytes 2367-2925 test('should show custom input when custom model is selected', () => { const ui = createModelSelectionUI('claude-3-sonnet'); document.body.appendChild(ui); const customRadio = ui.querySelector('input[value="custom"]'); const customInput = ui.querySelector('.custom-model-input'); const customInputField = ui.querySelector('#custom-model-name'); e...test('should hide custom input for predefined models', () => { const ui = createModelSelectionUI('gpt-5-nano'); document.body.appendChild(ui); const customInput = ui.querySelector('.custom-model-input'); expect(customInput.style.display).toBe('none'); });
Code excerptlines 69-76, bytes 2932-3228 test('should hide custom input for predefined models', () => { const ui = createModelSelectionUI('gpt-5-nano'); document.body.appendChild(ui); const customInput = ui.querySelector('.custom-model-input'); expect(customInput.style.display).toBe('none'); });test('should get selected model value correctly', () => { const ui = createModelSelectionUI('gpt-5-nano'); document.body.appendChild(ui); const selectedRadio = ui.querySelector('input[name="gpt-version"]:checked'); expect(selectedRadio.value).toBe('gpt-5-nano'); });
Code excerptlines 78-84, bytes 3235-3535 test('should get selected model value correctly', () => { const ui = createModelSelectionUI('gpt-5-nano'); document.body.appendChild(ui); const selectedRadio = ui.querySelector('input[name="gpt-version"]:checked'); expect(selectedRadio.value).toBe('gpt-5-nano'); });test('should handle custom model selection', () => { const ui = createModelSelectionUI('gpt-4-turbo'); document.body.appendChild(ui); const customRadio = ui.querySelector('input[value="custom"]'); const customInputField = ui.querySelector('#custom-model-name'); expect(customRadio.checked).toBe(true); expect(customInputField.value).toBe('gpt-4-t...
Code excerptlines 86-95, bytes 3542-3952 test('should handle custom model selection', () => { const ui = createModelSelectionUI('gpt-4-turbo'); document.body.appendChild(ui); const customRadio = ui.querySelector('input[value="custom"]'); const customInputField = ui.querySelector('#custom-model-name'); expect(customRadio.checked).toBe(true); expect(customInputField.value).toBe('gpt-4-t...\n});describe('LocalStorage Integration', () => { beforeEach(() => { localStorage.clear(); jest.clearAllMocks(); }); test('should save selected model to localStorage', () => { localStorage.setItem('selectedGPTModel', 'gpt-5-nano'); // Test that we can retrieve what we set const saved = localStorage.getItem('selectedGPTModel'); expect(saved).toBe...
Code excerptlines 98-135, bytes 3963-5310 describe('LocalStorage Integration', () => { beforeEach(() => { localStorage.clear(); jest.clearAllMocks(); }); test('should save selected model to localStorage', () => { localStorage.setItem('selectedGPTModel', 'gpt-5-nano'); // Test that we can retrieve what we set const saved = localStorage.getItem('selectedGPTModel'); expect(saved).toBe...beforeEach(() => { localStorage.clear(); jest.clearAllMocks(); });
Code excerptlines 99-102, bytes 4012-4093 describe('LocalStorage Integration', () => {\nbeforeEach(() => { localStorage.clear(); jest.clearAllMocks(); });jest.clearAllMocks()
Code excerptline 101, bytes 4065-4085 \njest.clearAllMocks()\n;test('should save selected model to localStorage', () => { localStorage.setItem('selectedGPTModel', 'gpt-5-nano'); // Test that we can retrieve what we set const saved = localStorage.getItem('selectedGPTModel'); expect(saved).toBe('gpt-5-nano'); });
Code excerptlines 104-110, bytes 4100-4383 test('should save selected model to localStorage', () => { localStorage.setItem('selectedGPTModel', 'gpt-5-nano'); // Test that we can retrieve what we set const saved = localStorage.getItem('selectedGPTModel'); expect(saved).toBe('gpt-5-nano'); });test('should load saved model from localStorage', () => { // Use the mock implementation localStorage.setItem('selectedGPTModel', 'gpt-5-nano'); const savedModel = localStorage.getItem('selectedGPTModel') || 'gpt-4o'; expect(savedModel).toBe('gpt-5-nano'); });
Code excerptlines 112-118, bytes 4390-4684 test('should load saved model from localStorage', () => { // Use the mock implementation localStorage.setItem('selectedGPTModel', 'gpt-5-nano'); const savedModel = localStorage.getItem('selectedGPTModel') || 'gpt-4o'; expect(savedModel).toBe('gpt-5-nano'); });test('should default to gpt-4o when no saved model', () => { // Don't set anything, should return null const savedModel = localStorage.getItem('selectedGPTModel') || 'gpt-4o'; expect(savedModel).toBe('gpt-4o'); });
Code excerptlines 120-124, bytes 4691-4926 test('should default to gpt-4o when no saved model', () => { // Don't set anything, should return null const savedModel = localStorage.getItem('selectedGPTModel') || 'gpt-4o'; expect(savedModel).toBe('gpt-4o'); });test('should handle custom model persistence', () => { localStorage.setItem('selectedGPTModel', 'claude-3-opus'); const savedModel = localStorage.getItem('selectedGPTModel'); const isCustomModel = !['gpt-4o', 'gpt-5-nano'].includes(savedModel); expect(isCustomModel).toBe(true); expect(savedModel).toBe('claude-3-opus'); });
Code excerptlines 126-134, bytes 4933-5304 test('should handle custom model persistence', () => { localStorage.setItem('selectedGPTModel', 'claude-3-opus'); const savedModel = localStorage.getItem('selectedGPTModel'); const isCustomModel = !['gpt-4o', 'gpt-5-nano'].includes(savedModel); expect(isCustomModel).toBe(true); expect(savedModel).toBe('claude-3-opus'); });\n});describe('UI Event Simulation', () => { test('should handle radio button change events', () => { const ui = createModelSelectionUI(); document.body.appendChild(ui); const gpt5Radio = ui.querySelector('input[value="gpt-5-nano"]'); const changeHandler = jest.fn(); gpt5Radio.addEventListener('change', changeHandler); // Simulate clicking ...
Code excerptlines 137-247, bytes 5315-9530 describe('UI Event Simulation', () => { test('should handle radio button change events', () => { const ui = createModelSelectionUI(); document.body.appendChild(ui); const gpt5Radio = ui.querySelector('input[value="gpt-5-nano"]'); const changeHandler = jest.fn(); gpt5Radio.addEventListener('change', changeHandler); // Simulate clicking ...test('should handle radio button change events', () => { const ui = createModelSelectionUI(); document.body.appendChild(ui); const gpt5Radio = ui.querySelector('input[value="gpt-5-nano"]'); const changeHandler = jest.fn(); gpt5Radio.addEventListener('change', changeHandler); // Simulate clicking the radio button gpt5Radio.click(); ...
Code excerptlines 138-152, bytes 5359-5860 describe('UI Event Simulation', () => {\ntest('should handle radio button change events', () => { const ui = createModelSelectionUI(); document.body.appendChild(ui); const gpt5Radio = ui.querySelector('input[value="gpt-5-nano"]'); const changeHandler = jest.fn(); gpt5Radio.addEventListener('change', changeHandler); // Simulate clicking the radio button gpt5Radio.click(); ...jest.fn()
Code excerptline 143, bytes 5602-5611 const changeHandler =\njest.fn()\n;test('should handle custom input field changes', () => { const ui = createModelSelectionUI('custom-model'); document.body.appendChild(ui); const customInput = ui.querySelector('#custom-model-name'); const inputHandler = jest.fn(); customInput.addEventListener('input', inputHandler); // Simulate typing in the input customInput.value...
Code excerptlines 154-169, bytes 5867-6447 test('should handle custom input field changes', () => { const ui = createModelSelectionUI('custom-model'); document.body.appendChild(ui); const customInput = ui.querySelector('#custom-model-name'); const inputHandler = jest.fn(); customInput.addEventListener('input', inputHandler); // Simulate typing in the input customInput.value...jest.fn()
Code excerptline 159, bytes 6118-6127 const inputHandler =\njest.fn()\n;test('should detect the start node from a text line at any depth', () => { // mirrors isStartNode in content.js: instead of a fixed child path like // children[0].children[1].children[1], any line of the node's visible // text equal to "Start" marks the auto-layout start node const containsStartLabel = (innerText) => (innerText ?? '').split('\n').some(line => li...
Code excerptlines 171-183, bytes 6454-7234 test('should detect the start node from a text line at any depth', () => { // mirrors isStartNode in content.js: instead of a fixed child path like // children[0].children[1].children[1], any line of the node's visible // text equal to "Start" marks the auto-layout start node const containsStartLabel = (innerText) => (innerText ?? '').split('\n').some(line => li...test('should send flow definition only once when ready message and load both fire', () => { // content.js sends the definition on the popup's "ready" postMessage with // the iframe load event as fallback; the second signal must be a no-op const sendMessage = jest.fn(); let definitionSent = false; const sendDefinitionOnce = () => { if (definitionSent) { ...
Code excerptlines 185-204, bytes 7241-7962 test('should send flow definition only once when ready message and load both fire', () => { // content.js sends the definition on the popup's "ready" postMessage with // the iframe load event as fallback; the second signal must be a no-op const sendMessage = jest.fn(); let definitionSent = false; const sendDefinitionOnce = () => { if (definitionSent) { ...jest.fn()
Code excerptline 188, bytes 7518-7527 const sendMessage =\njest.fn()\n;test('should not stack duplicate handlers when parseFlow runs again', () => { // parseFlow assigns handler properties (onclick/onchange/oninput) instead of // addEventListener, so receiving a second flow definition replaces the // handler rather than firing one API call per previous parseFlow run const button = document.createElement('button'); document.body.appen...
Code excerptlines 206-224, bytes 7969-8729 test('should not stack duplicate handlers when parseFlow runs again', () => { // parseFlow assigns handler properties (onclick/onchange/oninput) instead of // addEventListener, so receiving a second flow definition replaces the // handler rather than firing one API call per previous parseFlow run const button = document.createElement('button'); document.body.appen...jest.fn()
Code excerptline 213, bytes 8409-8418 const firstHandler =\njest.fn()\n;jest.fn()
Code excerptline 214, bytes 8448-8457 const secondHandler =\njest.fn()\n;test('should show/hide custom input based on selection', () => { const ui = createModelSelectionUI(); document.body.appendChild(ui); const customRadio = ui.querySelector('input[value="custom"]'); const gpt4Radio = ui.querySelector('input[value="gpt-4o"]'); const customInput = ui.querySelector('.custom-model-input'); // Initially hidden ex...
Code excerptlines 226-246, bytes 8736-9524 test('should show/hide custom input based on selection', () => { const ui = createModelSelectionUI(); document.body.appendChild(ui); const customRadio = ui.querySelector('input[value="custom"]'); const gpt4Radio = ui.querySelector('input[value="gpt-4o"]'); const customInput = ui.querySelector('.custom-model-input'); // Initially hidden ex...\n});describe('Error Handling', () => { test('should handle missing DOM elements gracefully', () => { const ui = document.createElement('div'); document.body.appendChild(ui); const nonExistentRadio = ui.querySelector('input[name="gpt-version"]:checked'); expect(nonExistentRadio).toBeNull(); }); test('should handle malformed HTML gracefully', () => { c...
Code excerptlines 249-273, bytes 9535-10524 describe('Error Handling', () => { test('should handle missing DOM elements gracefully', () => { const ui = document.createElement('div'); document.body.appendChild(ui); const nonExistentRadio = ui.querySelector('input[name="gpt-version"]:checked'); expect(nonExistentRadio).toBeNull(); }); test('should handle malformed HTML gracefully', () => { c...\n});test('should handle missing DOM elements gracefully', () => { const ui = document.createElement('div'); document.body.appendChild(ui); const nonExistentRadio = ui.querySelector('input[name="gpt-version"]:checked'); expect(nonExistentRadio).toBeNull(); });
Code excerptlines 250-256, bytes 9574-9863 describe('Error Handling', () => {\ntest('should handle missing DOM elements gracefully', () => { const ui = document.createElement('div'); document.body.appendChild(ui); const nonExistentRadio = ui.querySelector('input[name="gpt-version"]:checked'); expect(nonExistentRadio).toBeNull(); });test('should handle malformed HTML gracefully', () => { const ui = document.createElement('div'); ui.innerHTML = '<input type="radio" name="gpt-version" value="test">'; // Fixed HTML document.body.appendChild(ui); const radio = ui.querySelector('input[name="gpt-version"]'); expect(radio).not.toBeNull(); expect(radio.value).toBe('test'); });
Code excerptlines 258-266, bytes 9870-10258 test('should handle malformed HTML gracefully', () => { const ui = document.createElement('div'); ui.innerHTML = '<input type="radio" name="gpt-version" value="test">'; // Fixed HTML document.body.appendChild(ui); const radio = ui.querySelector('input[name="gpt-version"]'); expect(radio).not.toBeNull(); expect(radio.value).toBe('test'); });test('should handle undefined localStorage values', () => { // Don't set anything, localStorage.getItem will return null const savedModel = localStorage.getItem('selectedGPTModel') || 'gpt-4o'; expect(savedModel).toBe('gpt-4o'); });
Code excerptlines 268-272, bytes 10265-10518 test('should handle undefined localStorage values', () => { // Don't set anything, localStorage.getItem will return null const savedModel = localStorage.getItem('selectedGPTModel') || 'gpt-4o'; expect(savedModel).toBe('gpt-4o'); });\n});
describe('FlowParserShared', () => { describe('getValue', () => { test('should extract whichever value field is present', () => { expect(FlowParserShared.getValue({ stringValue: 'abc' })).toBe('abc'); expect(FlowParserShared.getValue({ numberValue: 42 })).toBe(42); expect(FlowParserShared.getValue({ booleanValue: false })).toBe(false); expect(FlowParserShared.getValu...
Code excerptlines 6-589, bytes 190-24645 describe('FlowParserShared', () => { describe('getValue', () => { test('should extract whichever value field is present', () => { expect(FlowParserShared.getValue({ stringValue: 'abc' })).toBe('abc'); expect(FlowParserShared.getValue({ numberValue: 42 })).toBe(42); expect(FlowParserShared.getValue({ booleanValue: false })).toBe(false); expect(FlowParserShared.getValu...describe('getValue', () => { test('should extract whichever value field is present', () => { expect(FlowParserShared.getValue({ stringValue: 'abc' })).toBe('abc'); expect(FlowParserShared.getValue({ numberValue: 42 })).toBe(42); expect(FlowParserShared.getValue({ booleanValue: false })).toBe(false); expect(FlowParserShared.getValue({ elementReference: 'varName' })).to...
Code excerptlines 8-23, bytes 230-1103 describe('getValue', () => { test('should extract whichever value field is present', () => { expect(FlowParserShared.getValue({ stringValue: 'abc' })).toBe('abc'); expect(FlowParserShared.getValue({ numberValue: 42 })).toBe(42); expect(FlowParserShared.getValue({ booleanValue: false })).toBe(false); expect(FlowParserShared.getValue({ elementReference: 'varName' })).to...test('should extract whichever value field is present', () => { expect(FlowParserShared.getValue({ stringValue: 'abc' })).toBe('abc'); expect(FlowParserShared.getValue({ numberValue: 42 })).toBe(42); expect(FlowParserShared.getValue({ booleanValue: false })).toBe(false); expect(FlowParserShared.getValue({ elementReference: 'varName' })).toBe('varName'); expect(Flo...
Code excerptlines 9-16, bytes 263-812 describe('getValue', () => {\ntest('should extract whichever value field is present', () => { expect(FlowParserShared.getValue({ stringValue: 'abc' })).toBe('abc'); expect(FlowParserShared.getValue({ numberValue: 42 })).toBe(42); expect(FlowParserShared.getValue({ booleanValue: false })).toBe(false); expect(FlowParserShared.getValue({ elementReference: 'varName' })).toBe('varName'); expect(Flo...test('should return the default for empty or missing values', () => { expect(FlowParserShared.getValue({}, 'null')).toBe('null'); expect(FlowParserShared.getValue(null, 'null')).toBe('null'); expect(FlowParserShared.getValue(undefined)).toBeUndefined(); });
Code excerptlines 18-22, bytes 819-1097 test('should return the default for empty or missing values', () => { expect(FlowParserShared.getValue({}, 'null')).toBe('null'); expect(FlowParserShared.getValue(null, 'null')).toBe('null'); expect(FlowParserShared.getValue(undefined)).toBeUndefined(); });\n});describe('buildDefinitionMap', () => { test('should index present collections and default missing ones to empty arrays', () => { const flowDefinition = { decisions: [{ name: 'Check' }], recordCreates: [{ name: 'Create' }] }; const definitionMap = FlowParserShared.buildDefinitionMap(flowDefinition); expect(definitionMap.get('decisions')).toHaveLength(...
Code excerptlines 25-41, bytes 1108-1833 describe('buildDefinitionMap', () => { test('should index present collections and default missing ones to empty arrays', () => { const flowDefinition = { decisions: [{ name: 'Check' }], recordCreates: [{ name: 'Create' }] }; const definitionMap = FlowParserShared.buildDefinitionMap(flowDefinition); expect(definitionMap.get('decisions')).toHaveLength(...test('should index present collections and default missing ones to empty arrays', () => { const flowDefinition = { decisions: [{ name: 'Check' }], recordCreates: [{ name: 'Create' }] }; const definitionMap = FlowParserShared.buildDefinitionMap(flowDefinition); expect(definitionMap.get('decisions')).toHaveLength(1); expect(definitionMap.get('recor...
Code excerptlines 26-40, bytes 1151-1827 describe('buildDefinitionMap', () => {\ntest('should index present collections and default missing ones to empty arrays', () => { const flowDefinition = { decisions: [{ name: 'Check' }], recordCreates: [{ name: 'Create' }] }; const definitionMap = FlowParserShared.buildDefinitionMap(flowDefinition); expect(definitionMap.get('decisions')).toHaveLength(1); expect(definitionMap.get('recor...\n});describe('findElementByLabel', () => { test('should find an element across collections and tag its type', () => { const definitionMap = FlowParserShared.buildDefinitionMap({ screens: [{ name: 'S1', label: 'My Screen' }], recordLookups: [{ name: 'L1', label: 'Get Records' }] }); const found = FlowParserShared.findElementByLabel(definitionMap, 'Get Records');...
Code excerptlines 43-71, bytes 1838-3005 describe('findElementByLabel', () => { test('should find an element across collections and tag its type', () => { const definitionMap = FlowParserShared.buildDefinitionMap({ screens: [{ name: 'S1', label: 'My Screen' }], recordLookups: [{ name: 'L1', label: 'Get Records' }] }); const found = FlowParserShared.findElementByLabel(definitionMap, 'Get Records');...test('should find an element across collections and tag its type', () => { const definitionMap = FlowParserShared.buildDefinitionMap({ screens: [{ name: 'S1', label: 'My Screen' }], recordLookups: [{ name: 'L1', label: 'Get Records' }] }); const found = FlowParserShared.findElementByLabel(definitionMap, 'Get Records'); expect(found.name).toBe('L1'); ...
Code excerptlines 44-54, bytes 1881-2329 describe('findElementByLabel', () => {\ntest('should find an element across collections and tag its type', () => { const definitionMap = FlowParserShared.buildDefinitionMap({ screens: [{ name: 'S1', label: 'My Screen' }], recordLookups: [{ name: 'L1', label: 'Get Records' }] }); const found = FlowParserShared.findElementByLabel(definitionMap, 'Get Records'); expect(found.name).toBe('L1'); ...test('should return null when no element matches', () => { const definitionMap = FlowParserShared.buildDefinitionMap({}); expect(FlowParserShared.findElementByLabel(definitionMap, 'Nope')).toBeNull(); });
Code excerptlines 56-59, bytes 2336-2555 test('should return null when no element matches', () => { const definitionMap = FlowParserShared.buildDefinitionMap({}); expect(FlowParserShared.findElementByLabel(definitionMap, 'Nope')).toBeNull(); });test('should return the first match even when the label is ambiguous', () => { const definitionMap = FlowParserShared.buildDefinitionMap({ recordUpdates: [ { name: 'Update_Record', label: 'Update Record' }, { name: 'Update_Record0', label: 'Update Record' } ] }); expect(FlowParserShared.findElementByLabel(definitionMap, 'Update Record').nam...
Code excerptlines 61-70, bytes 2562-2999 test('should return the first match even when the label is ambiguous', () => { const definitionMap = FlowParserShared.buildDefinitionMap({ recordUpdates: [ { name: 'Update_Record', label: 'Update Record' }, { name: 'Update_Record0', label: 'Update Record' } ] }); expect(FlowParserShared.findElementByLabel(definitionMap, 'Update Record').nam...\n});describe('findElementsByLabel', () => { test('should return every element sharing a label, each tagged with its type', () => { const definitionMap = FlowParserShared.buildDefinitionMap({ recordUpdates: [ { name: 'Update_Record', label: 'Update Record' }, { name: 'Update_Record0', label: 'Update Record' } ], screens: [{ name: 'S1', label: 'Upd...
Code excerptlines 73-103, bytes 3010-4328 describe('findElementsByLabel', () => { test('should return every element sharing a label, each tagged with its type', () => { const definitionMap = FlowParserShared.buildDefinitionMap({ recordUpdates: [ { name: 'Update_Record', label: 'Update Record' }, { name: 'Update_Record0', label: 'Update Record' } ], screens: [{ name: 'S1', label: 'Upd...test('should return every element sharing a label, each tagged with its type', () => { const definitionMap = FlowParserShared.buildDefinitionMap({ recordUpdates: [ { name: 'Update_Record', label: 'Update Record' }, { name: 'Update_Record0', label: 'Update Record' } ], screens: [{ name: 'S1', label: 'Update Record' }] }); const matc...
Code excerptlines 74-89, bytes 3054-3757 describe('findElementsByLabel', () => {\ntest('should return every element sharing a label, each tagged with its type', () => { const definitionMap = FlowParserShared.buildDefinitionMap({ recordUpdates: [ { name: 'Update_Record', label: 'Update Record' }, { name: 'Update_Record0', label: 'Update Record' } ], screens: [{ name: 'S1', label: 'Update Record' }] }); const matc...test('should return a single-element array for a unique label', () => { const definitionMap = FlowParserShared.buildDefinitionMap({ recordLookups: [{ name: 'L1', label: 'Get Records' }] }); expect(FlowParserShared.findElementsByLabel(definitionMap, 'Get Records')) .toHaveLength(1); });
Code excerptlines 91-97, bytes 3764-4087 test('should return a single-element array for a unique label', () => { const definitionMap = FlowParserShared.buildDefinitionMap({ recordLookups: [{ name: 'L1', label: 'Get Records' }] }); expect(FlowParserShared.findElementsByLabel(definitionMap, 'Get Records')) .toHaveLength(1); });test('should return an empty array when nothing matches', () => { const definitionMap = FlowParserShared.buildDefinitionMap({}); expect(FlowParserShared.findElementsByLabel(definitionMap, 'Nope')).toEqual([]); });
Code excerptlines 99-102, bytes 4094-4322 test('should return an empty array when nothing matches', () => { const definitionMap = FlowParserShared.buildDefinitionMap({}); expect(FlowParserShared.findElementsByLabel(definitionMap, 'Nope')).toEqual([]); });\n});describe('resolveAmbiguousElement', () => { // two record updates share the label "Update Record"; one is followed by // End, the other by a screen function ambiguousFlow() { return { startElementReference: 'Start_Decision', decisions: [{ name: 'Start_Decision', label: 'Start', defaultConnectorLabel: 'Else', defaultConnector: { targ...
Code excerptlines 105-245, bytes 4333-10696 describe('resolveAmbiguousElement', () => { // two record updates share the label "Update Record"; one is followed by // End, the other by a screen function ambiguousFlow() { return { startElementReference: 'Start_Decision', decisions: [{ name: 'Start_Decision', label: 'Start', defaultConnectorLabel: 'Else', defaultConnector: { targ...test('should pick the element whose successor matches the assistive text', () => { const flow = ambiguousFlow(); const matches = matchesFor(flow, 'Update Record'); // "followed by Notify" identifies Update_Record0; "followed by End" // identifies Update_Record expect(FlowParserShared.resolveAmbiguousElement( flow, matches, 'On outcome (Else), followed by ...
Code excerptlines 132-144, bytes 5397-6044 test('should pick the element whose successor matches the assistive text', () => { const flow = ambiguousFlow(); const matches = matchesFor(flow, 'Update Record'); // "followed by Notify" identifies Update_Record0; "followed by End" // identifies Update_Record expect(FlowParserShared.resolveAmbiguousElement( flow, matches, 'On outcome (Else), followed by ...test('should break a successor tie on the incoming-connector count', () => { // both share the label and both terminate (followed by End), so the // successor cannot tell them apart; A has one incoming connector, B two const flow = { startElementReference: 'Feed_A', recordLookups: [ { name: 'Feed_A', label: 'Feed A', object: 'Account', co...
Code excerptlines 146-172, bytes 6051-7365 test('should break a successor tie on the incoming-connector count', () => { // both share the label and both terminate (followed by End), so the // successor cannot tell them apart; A has one incoming connector, B two const flow = { startElementReference: 'Feed_A', recordLookups: [ { name: 'Feed_A', label: 'Feed A', object: 'Account', co...test('should return null when the text cannot single one out', () => { const flow = ambiguousFlow(); const matches = matchesFor(flow, 'Update Record'); // a successor that matches neither candidate -> no assumption expect(FlowParserShared.resolveAmbiguousElement( flow, matches, 'followed by Nowhere')).toBeNull(); // no usable assistive text at all ex...
Code excerptlines 174-183, bytes 7372-7945 test('should return null when the text cannot single one out', () => { const flow = ambiguousFlow(); const matches = matchesFor(flow, 'Update Record'); // a successor that matches neither candidate -> no assumption expect(FlowParserShared.resolveAmbiguousElement( flow, matches, 'followed by Nowhere')).toBeNull(); // no usable assistive text at all ex...test('should return null when there is nothing to disambiguate', () => { const flow = ambiguousFlow(); const single = matchesFor(flow, 'Notify'); expect(FlowParserShared.resolveAmbiguousElement( flow, single, 'followed by End')).toBeNull(); });
Code excerptlines 185-190, bytes 7952-8225 test('should return null when there is nothing to disambiguate', () => { const flow = ambiguousFlow(); const single = matchesFor(flow, 'Notify'); expect(FlowParserShared.resolveAmbiguousElement( flow, single, 'followed by End')).toBeNull(); });test('should tell apart two terminal screens by fault path vs decision outcome', () => { // the real-world case: two "Error" screens that both end, one reached by // a fault path, the other by a decision outcome const flow = { startElementReference: 'Do_Work', recordCreates: [{ name: 'Do_Work', label: 'Do Work', object: 'Account', connector...
Code excerptlines 192-224, bytes 8232-9787 test('should tell apart two terminal screens by fault path vs decision outcome', () => { // the real-world case: two "Error" screens that both end, one reached by // a fault path, the other by a decision outcome const flow = { startElementReference: 'Do_Work', recordCreates: [{ name: 'Do_Work', label: 'Do Work', object: 'Account', connector...test('should tell apart two elements on different named decision outcomes', () => { const flow = { startElementReference: 'Check', decisions: [{ name: 'Check', label: 'Check', defaultConnectorLabel: 'Else', defaultConnector: { targetReference: 'Note_Else' }, rules: [{ name: 'Hot', label: 'Hot', connector: { targetReference: 'Note_Hot' } }] ...
Code excerptlines 226-244, bytes 9794-10690 test('should tell apart two elements on different named decision outcomes', () => { const flow = { startElementReference: 'Check', decisions: [{ name: 'Check', label: 'Check', defaultConnectorLabel: 'Else', defaultConnector: { targetReference: 'Note_Else' }, rules: [{ name: 'Hot', label: 'Hot', connector: { targetReference: 'Note_Hot' } }] ...\n});describe('buildElementGraph', () => { test('should synthesize the Start element and label decision branches', () => { const flowDefinition = { startElementReference: 'Check', decisions: [{ name: 'Check', label: 'Check Status', defaultConnectorLabel: 'Otherwise', rules: [{ label: 'Is Active', connector: { targetReference: 'Create_T...
Code excerptlines 247-270, bytes 10701-11812 describe('buildElementGraph', () => { test('should synthesize the Start element and label decision branches', () => { const flowDefinition = { startElementReference: 'Check', decisions: [{ name: 'Check', label: 'Check Status', defaultConnectorLabel: 'Otherwise', rules: [{ label: 'Is Active', connector: { targetReference: 'Create_T...test('should synthesize the Start element and label decision branches', () => { const flowDefinition = { startElementReference: 'Check', decisions: [{ name: 'Check', label: 'Check Status', defaultConnectorLabel: 'Otherwise', rules: [{ label: 'Is Active', connector: { targetReference: 'Create_Task' } }] }], recordCrea...
Code excerptlines 248-269, bytes 10743-11806 describe('buildElementGraph', () => {\ntest('should synthesize the Start element and label decision branches', () => { const flowDefinition = { startElementReference: 'Check', decisions: [{ name: 'Check', label: 'Check Status', defaultConnectorLabel: 'Otherwise', rules: [{ label: 'Is Active', connector: { targetReference: 'Create_Task' } }] }], recordCrea...\n});describe('getFlowOverview / renderExplanation', () => { test('should narrate a record create behind a decision in the shared voice', () => { const flowDefinition = { startElementReference: 'Check', decisions: [{ name: 'Check', label: 'Check Status', rules: [{ label: 'Is Active', connector: { targetReference: 'Create_Task' } }] }], ...
Code excerptlines 272-374, bytes 11817-16136 describe('getFlowOverview / renderExplanation', () => { test('should narrate a record create behind a decision in the shared voice', () => { const flowDefinition = { startElementReference: 'Check', decisions: [{ name: 'Check', label: 'Check Status', rules: [{ label: 'Is Active', connector: { targetReference: 'Create_Task' } }] }], ...test('should narrate a record create behind a decision in the shared voice', () => { const flowDefinition = { startElementReference: 'Check', decisions: [{ name: 'Check', label: 'Check Status', rules: [{ label: 'Is Active', connector: { targetReference: 'Create_Task' } }] }], recordCreates: [{ name: 'Create_Task', label: 'Crea...
Code excerptlines 273-288, bytes 11877-12548 describe('getFlowOverview / renderExplanation', () => {\ntest('should narrate a record create behind a decision in the shared voice', () => { const flowDefinition = { startElementReference: 'Check', decisions: [{ name: 'Check', label: 'Check Status', rules: [{ label: 'Is Active', connector: { targetReference: 'Create_Task' } }] }], recordCreates: [{ name: 'Create_Task', label: 'Crea...test('should mark loop-body operations and narrate the loop context', () => { const flowDefinition = { startElementReference: 'Loop_Items', loops: [{ name: 'Loop_Items', label: 'Loop Items', nextValueConnector: { targetReference: 'Update_Item' } }], recordUpdates: [{ name: 'Update_Item', label: 'Update Item', object: 'Contact'...
Code excerptlines 290-307, bytes 12555-13259 test('should mark loop-body operations and narrate the loop context', () => { const flowDefinition = { startElementReference: 'Loop_Items', loops: [{ name: 'Loop_Items', label: 'Loop Items', nextValueConnector: { targetReference: 'Update_Item' } }], recordUpdates: [{ name: 'Update_Item', label: 'Update Item', object: 'Contact'...test('should narrate assignments that touch input/output variables', () => { const flowDefinition = { startElementReference: 'Set_Result', variables: [ { name: 'varResult', dataType: 'String', isInput: false, isOutput: true }, { name: 'varInput', dataType: 'String', isInput: true, isOutput: false }, { name: 'varScratch', dataType: 'String', i...
Code excerptlines 309-337, bytes 13266-14554 test('should narrate assignments that touch input/output variables', () => { const flowDefinition = { startElementReference: 'Set_Result', variables: [ { name: 'varResult', dataType: 'String', isInput: false, isOutput: true }, { name: 'varInput', dataType: 'String', isInput: true, isOutput: false }, { name: 'varScratch', dataType: 'String', i...test('should not throw on flows with sparse element collections', () => { const flowDefinition = { startElementReference: 'Update_It', recordUpdates: [{ name: 'Update_It', label: 'Update It', inputReference: 'record' }] }; expect(() => FlowParserShared.getFlowOverview(flowDefinition)).not.toThrow(); });
Code excerptlines 339-345, bytes 14561-14902 test('should not throw on flows with sparse element collections', () => { const flowDefinition = { startElementReference: 'Update_It', recordUpdates: [{ name: 'Update_It', label: 'Update It', inputReference: 'record' }] }; expect(() => FlowParserShared.getFlowOverview(flowDefinition)).not.toThrow(); });test('should return empty facts when the start element is unresolvable', () => { const { facts } = FlowParserShared.getFlowOverview({}); expect(facts).toEqual([]); });
Code excerptlines 347-350, bytes 14909-15091 test('should return empty facts when the start element is unresolvable', () => { const { facts } = FlowParserShared.getFlowOverview({}); expect(facts).toEqual([]); });test('should not mutate the flow definition (it must stay serializable)', () => { // content.js sends flowDefinition through chrome.runtime.sendMessage after // the start-node tooltip may have built the graph; parentBranch cycles on // the original objects made it unserializable (reported as // "Could not serialize message") const flowDefinition = { startE...
Code excerptlines 352-373, bytes 15098-16130 test('should not mutate the flow definition (it must stay serializable)', () => { // content.js sends flowDefinition through chrome.runtime.sendMessage after // the start-node tooltip may have built the graph; parentBranch cycles on // the original objects made it unserializable (reported as // "Could not serialize message") const flowDefinition = { startE...\n});describe('generateMermaidDiagram', () => { function makeOverview(flowDefinition) { const { actionMap } = FlowParserShared.getFlowOverview(flowDefinition); return actionMap; } test('should render shaped nodes with tooltip explanations and labeled edges', () => { const actionMap = makeOverview({ startElementReference: 'Check', decisions: [{ ...
Code excerptlines 376-438, bytes 16141-18686 describe('generateMermaidDiagram', () => { function makeOverview(flowDefinition) { const { actionMap } = FlowParserShared.getFlowOverview(flowDefinition); return actionMap; } test('should render shaped nodes with tooltip explanations and labeled edges', () => { const actionMap = makeOverview({ startElementReference: 'Check', decisions: [{ ...test('should render shaped nodes with tooltip explanations and labeled edges', () => { const actionMap = makeOverview({ startElementReference: 'Check', decisions: [{ name: 'Check', label: 'Check Status', rules: [{ label: 'Is Active', connector: { targetReference: 'Create_Task' } }] }], recordCreates: [{ name: 'Create...
Code excerptlines 382-408, bytes 16341-17662 test('should render shaped nodes with tooltip explanations and labeled edges', () => { const actionMap = makeOverview({ startElementReference: 'Check', decisions: [{ name: 'Check', label: 'Check Status', rules: [{ label: 'Is Active', connector: { targetReference: 'Create_Task' } }] }], recordCreates: [{ name: 'Create...test('should escape quotes and pipes in labels', () => { const actionMap = makeOverview({ startElementReference: 'Get_It', recordLookups: [{ name: 'Get_It', label: 'Get "A|B" Records', object: 'Account' }] }); const diagram = FlowParserShared.generateMermaidDiagram(actionMap); expect(diagram).toContain('Get_It["Get #quot;A/B#quot; Records'); expe...
Code excerptlines 410-420, bytes 17669-18107 test('should escape quotes and pipes in labels', () => { const actionMap = makeOverview({ startElementReference: 'Get_It', recordLookups: [{ name: 'Get_It', label: 'Get "A|B" Records', object: 'Account' }] }); const diagram = FlowParserShared.generateMermaidDiagram(actionMap); expect(diagram).toContain('Get_It["Get #quot;A/B#quot; Records'); expe...test('should skip edges to dangling targets and non-canvas elements', () => { const actionMap = makeOverview({ startElementReference: 'Assign_It', assignments: [{ name: 'Assign_It', label: 'Assign It', assignmentItems: [], connector: { targetReference: 'Gone' } }], variables: [{ name: 'varX', dataType: 'String' }] }); ...
Code excerptlines 422-437, bytes 18114-18680 test('should skip edges to dangling targets and non-canvas elements', () => { const actionMap = makeOverview({ startElementReference: 'Assign_It', assignments: [{ name: 'Assign_It', label: 'Assign It', assignmentItems: [], connector: { targetReference: 'Gone' } }], variables: [{ name: 'varX', dataType: 'String' }] }); ...\n});describe('lintFlow', () => { function lint(flowDefinition) { const { actionMap } = FlowParserShared.getFlowOverview(flowDefinition); return FlowParserShared.lintFlow(flowDefinition, actionMap); } test('should warn about DML inside a loop', () => { const issues = lint({ description: 'documented', startElementReference: 'Loop_Items', loops: [{...
Code excerptlines 440-543, bytes 18691-22817 describe('lintFlow', () => { function lint(flowDefinition) { const { actionMap } = FlowParserShared.getFlowOverview(flowDefinition); return FlowParserShared.lintFlow(flowDefinition, actionMap); } test('should warn about DML inside a loop', () => { const issues = lint({ description: 'documented', startElementReference: 'Loop_Items', loops: [{...test('should warn about DML inside a loop', () => { const issues = lint({ description: 'documented', startElementReference: 'Loop_Items', loops: [{ name: 'Loop_Items', label: 'Loop Items', description: 'd', nextValueConnector: { targetReference: 'Update_Item' } }], recordUpdates: [{ name: 'Update_Item', label: 'Update ...
Code excerptlines 446-463, bytes 18912-19601 test('should warn about DML inside a loop', () => { const issues = lint({ description: 'documented', startElementReference: 'Loop_Items', loops: [{ name: 'Loop_Items', label: 'Loop Items', description: 'd', nextValueConnector: { targetReference: 'Update_Item' } }], recordUpdates: [{ name: 'Update_Item', label: 'Update ...test('should flag DML without a fault path', () => { const issues = lint({ description: 'documented', startElementReference: 'Create_Task', recordCreates: [{ name: 'Create_Task', label: 'Create Task', object: 'Task', description: 'd' }] }); expect(issues.some(i => i.severity === 'info' && i.message.includes('Create_Task') && i.message....
Code excerptlines 465-475, bytes 19608-20050 test('should flag DML without a fault path', () => { const issues = lint({ description: 'documented', startElementReference: 'Create_Task', recordCreates: [{ name: 'Create_Task', label: 'Create Task', object: 'Task', description: 'd' }] }); expect(issues.some(i => i.severity === 'info' && i.message.includes('Create_Task') && i.message....test('should flag hardcoded record ids in filters', () => { const issues = lint({ description: 'documented', startElementReference: 'Get_Account', recordLookups: [{ name: 'Get_Account', label: 'Get Account', object: 'Account', description: 'd', filters: [{ field: 'Id', value: { stringValue: '0013000000abcDE' } }] }] }); exp...
Code excerptlines 477-489, bytes 20057-20590 test('should flag hardcoded record ids in filters', () => { const issues = lint({ description: 'documented', startElementReference: 'Get_Account', recordLookups: [{ name: 'Get_Account', label: 'Get Account', object: 'Account', description: 'd', filters: [{ field: 'Id', value: { stringValue: '0013000000abcDE' } }] }] }); exp...test('should not mistake ordinary strings for record ids', () => { const issues = lint({ description: 'documented', startElementReference: 'Get_Account', recordLookups: [{ name: 'Get_Account', label: 'Get Account', object: 'Account', description: 'd', filters: [{ field: 'Name', value: { stringValue: 'AcmeCorporation' } }] }] }); ...
Code excerptlines 491-502, bytes 20597-21086 test('should not mistake ordinary strings for record ids', () => { const issues = lint({ description: 'documented', startElementReference: 'Get_Account', recordLookups: [{ name: 'Get_Account', label: 'Get Account', object: 'Account', description: 'd', filters: [{ field: 'Name', value: { stringValue: 'AcmeCorporation' } }] }] }); ...test('should flag unreachable elements and missing descriptions', () => { const issues = lint({ startElementReference: 'Get_Account', recordLookups: [{ name: 'Get_Account', label: 'Get Account', object: 'Account' }], assignments: [{ name: 'Orphan', label: 'Orphan' }] }); expect(issues.some(i => i.severity === 'warning' && i.message.includes('O...
Code excerptlines 504-516, bytes 21093-21737 test('should flag unreachable elements and missing descriptions', () => { const issues = lint({ startElementReference: 'Get_Account', recordLookups: [{ name: 'Get_Account', label: 'Get Account', object: 'Account' }], assignments: [{ name: 'Orphan', label: 'Orphan' }] }); expect(issues.some(i => i.severity === 'warning' && i.message.includes('O...test('should flag canvas elements that share the same label', () => { const issues = lint({ description: 'documented', startElementReference: 'Update_Record', recordUpdates: [ { name: 'Update_Record', label: 'Update Record', object: 'Account', description: 'd', connector: { targetReference: 'Update_Record0' } }, { name: 'Update_Reco...
Code excerptlines 518-532, bytes 21744-22432 test('should flag canvas elements that share the same label', () => { const issues = lint({ description: 'documented', startElementReference: 'Update_Record', recordUpdates: [ { name: 'Update_Record', label: 'Update Record', object: 'Account', description: 'd', connector: { targetReference: 'Update_Record0' } }, { name: 'Update_Reco...test('should not flag a label that is unique', () => { const issues = lint({ description: 'documented', startElementReference: 'Get_Account', recordLookups: [{ name: 'Get_Account', label: 'Get Account', object: 'Account', description: 'd' }] }); expect(issues.some(i => i.message.includes('share the label'))).toBe(false); });
Code excerptlines 534-542, bytes 22439-22811 test('should not flag a label that is unique', () => { const issues = lint({ description: 'documented', startElementReference: 'Get_Account', recordLookups: [{ name: 'Get_Account', label: 'Get Account', object: 'Account', description: 'd' }] }); expect(issues.some(i => i.message.includes('share the label'))).toBe(false); });\n});describe('indexElements', () => { function makeActionMap() { const elements = [ { name: 'Start', branchArray: ['A'], branchLabelArray: ['from start'] }, { name: 'A', branchArray: ['B', 'C', 'Missing'], branchLabelArray: ['rule 1', 'rule 2', 'rule 3'] }, { name: 'B', branchArray: [], branchLabelArray: [] }, { name: 'C', branchArray: ['B'], branchLabelArra...
Code excerptlines 545-588, bytes 22822-24641 describe('indexElements', () => { function makeActionMap() { const elements = [ { name: 'Start', branchArray: ['A'], branchLabelArray: ['from start'] }, { name: 'A', branchArray: ['B', 'C', 'Missing'], branchLabelArray: ['rule 1', 'rule 2', 'rule 3'] }, { name: 'B', branchArray: [], branchLabelArray: [] }, { name: 'C', branchArray: ['B'], branchLabelArra...\n});test('should assign sequential indexes following all branches', () => { const actionMap = makeActionMap(); FlowParserShared.indexElements(actionMap, 'Start'); expect(actionMap.get('Start').index).toBe(1); expect(actionMap.get('A').index).toBe(2); expect(actionMap.get('B').index).toBe(3); expect(actionMap.get('C').index).toBe(4); });
Code excerptlines 556-565, bytes 23302-23677 test('should assign sequential indexes following all branches', () => { const actionMap = makeActionMap(); FlowParserShared.indexElements(actionMap, 'Start'); expect(actionMap.get('Start').index).toBe(1); expect(actionMap.get('A').index).toBe(2); expect(actionMap.get('B').index).toBe(3); expect(actionMap.get('C').index).toBe(4); });test('should link elements to their parent branch and condition', () => { const actionMap = makeActionMap(); FlowParserShared.indexElements(actionMap, 'Start'); expect(actionMap.get('Start').conditionLabel).toBe('start'); // A is the fork, so B and C belong to it with their branch labels expect(actionMap.get('B').parentBranch).toBe(actionMap.get('A')); exp...
Code excerptlines 567-577, bytes 23684-24205 test('should link elements to their parent branch and condition', () => { const actionMap = makeActionMap(); FlowParserShared.indexElements(actionMap, 'Start'); expect(actionMap.get('Start').conditionLabel).toBe('start'); // A is the fork, so B and C belong to it with their branch labels expect(actionMap.get('B').parentBranch).toBe(actionMap.get('A')); exp...test('should skip dangling branch references without throwing', () => { // branch 'Missing' has no element in the map const actionMap = makeActionMap(); expect(() => FlowParserShared.indexElements(actionMap, 'Start')).not.toThrow(); });
Code excerptlines 579-583, bytes 24212-24469 test('should skip dangling branch references without throwing', () => { // branch 'Missing' has no element in the map const actionMap = makeActionMap(); expect(() => FlowParserShared.indexElements(actionMap, 'Start')).not.toThrow(); });test('should do nothing when the first element is missing', () => { expect(() => FlowParserShared.indexElements(new Map(), 'Nope')).not.toThrow(); });
Code excerptlines 585-587, bytes 24476-24635 test('should do nothing when the first element is missing', () => { expect(() => FlowParserShared.indexElements(new Map(), 'Nope')).not.toThrow(); });\n});
describe("merge", () => { describe("Various", () => { it("accepts empty arrays for `mergeProcessCovs`", () => { const inputs: ProcessCov[] = []; const expected: ProcessCov = {result: []}; const actual: ProcessCov = mergeProcessCovs(inputs); chai.assert.deepEqual(actual, expected); }); it("accepts empty arrays for `mergeScriptCovs`", () => { const inputs...
Code excerptlines 28-252, bytes 931-8801 describe("merge", () => { describe("Various", () => { it("accepts empty arrays for `mergeProcessCovs`", () => { const inputs: ProcessCov[] = []; const expected: ProcessCov = {result: []}; const actual: ProcessCov = mergeProcessCovs(inputs); chai.assert.deepEqual(actual, expected); }); it("accepts empty arrays for `mergeScriptCovs`", () => { const inputs...describe("Various", () => { it("accepts empty arrays for `mergeProcessCovs`", () => { const inputs: ProcessCov[] = []; const expected: ProcessCov = {result: []}; const actual: ProcessCov = mergeProcessCovs(inputs); chai.assert.deepEqual(actual, expected); }); it("accepts empty arrays for `mergeScriptCovs`", () => { const inputs: ScriptCov[] = []; ...
Code excerptlines 29-182, bytes 959-6137 describe("merge", () => {\ndescribe("Various", () => { it("accepts empty arrays for `mergeProcessCovs`", () => { const inputs: ProcessCov[] = []; const expected: ProcessCov = {result: []}; const actual: ProcessCov = mergeProcessCovs(inputs); chai.assert.deepEqual(actual, expected); }); it("accepts empty arrays for `mergeScriptCovs`", () => { const inputs: ScriptCov[] = []; ...it("accepts empty arrays for `mergeProcessCovs`", () => { const inputs: ProcessCov[] = []; const expected: ProcessCov = {result: []}; const actual: ProcessCov = mergeProcessCovs(inputs); chai.assert.deepEqual(actual, expected); });
Code excerptlines 30-35, bytes 991-1249 describe("Various", () => {\nit("accepts empty arrays for `mergeProcessCovs`", () => { const inputs: ProcessCov[] = []; const expected: ProcessCov = {result: []}; const actual: ProcessCov = mergeProcessCovs(inputs); chai.assert.deepEqual(actual, expected); });it("accepts empty arrays for `mergeScriptCovs`", () => { const inputs: ScriptCov[] = []; const expected: ScriptCov | undefined = undefined; const actual: ScriptCov | undefined = mergeScriptCovs(inputs); chai.assert.deepEqual(actual, expected); });
Code excerptlines 37-42, bytes 1256-1530 it("accepts empty arrays for `mergeScriptCovs`", () => { const inputs: ScriptCov[] = []; const expected: ScriptCov | undefined = undefined; const actual: ScriptCov | undefined = mergeScriptCovs(inputs); chai.assert.deepEqual(actual, expected); });it("accepts empty arrays for `mergeFunctionCovs`", () => { const inputs: FunctionCov[] = []; const expected: FunctionCov | undefined = undefined; const actual: FunctionCov | undefined = mergeFunctionCovs(inputs); chai.assert.deepEqual(actual, expected); });
Code excerptlines 44-49, bytes 1537-1821 it("accepts empty arrays for `mergeFunctionCovs`", () => { const inputs: FunctionCov[] = []; const expected: FunctionCov | undefined = undefined; const actual: FunctionCov | undefined = mergeFunctionCovs(inputs); chai.assert.deepEqual(actual, expected); });it("accepts arrays with a single item for `mergeProcessCovs`", () => { const inputs: ProcessCov[] = [ { result: [ { scriptId: "123", url: "/lib.js", functions: [ { functionName: "test", isBlockCoverage: true, ranges: [ {startOff...
Code excerptlines 51-93, bytes 1828-3068 it("accepts arrays with a single item for `mergeProcessCovs`", () => { const inputs: ProcessCov[] = [ { result: [ { scriptId: "123", url: "/lib.js", functions: [ { functionName: "test", isBlockCoverage: true, ranges: [ {startOff...describe("mergeProcessCovs", () => { // see: https://github.com/demurgos/v8-coverage/issues/2 it("handles function coverage merged into block coverage", () => { const blockCoverage: ProcessCov = loadFixture("issue-2-block-coverage"); const functionCoverage: ProcessCov = loadFixture("issue-2-func-coverage"); const inputs: ProcessCov[] = [ functionCo...
Code excerptlines 95-121, bytes 3075-4305 describe("mergeProcessCovs", () => { // see: https://github.com/demurgos/v8-coverage/issues/2 it("handles function coverage merged into block coverage", () => { const blockCoverage: ProcessCov = loadFixture("issue-2-block-coverage"); const functionCoverage: ProcessCov = loadFixture("issue-2-func-coverage"); const inputs: ProcessCov[] = [ functionCo...it("handles function coverage merged into block coverage", () => { const blockCoverage: ProcessCov = loadFixture("issue-2-block-coverage"); const functionCoverage: ProcessCov = loadFixture("issue-2-func-coverage"); const inputs: ProcessCov[] = [ functionCoverage, blockCoverage, ]; const expected: ProcessCov = loadFixture("issue-2-ex...
Code excerptlines 97-107, bytes 3181-3703 // see: https://github.com/demurgos/v8-coverage/issues/2\nit("handles function coverage merged into block coverage", () => { const blockCoverage: ProcessCov = loadFixture("issue-2-block-coverage"); const functionCoverage: ProcessCov = loadFixture("issue-2-func-coverage"); const inputs: ProcessCov[] = [ functionCoverage, blockCoverage, ]; const expected: ProcessCov = loadFixture("issue-2-ex...it("handles block coverage merged into function coverage", () => { const blockCoverage: ProcessCov = loadFixture("issue-2-block-coverage"); const functionCoverage: ProcessCov = loadFixture("issue-2-func-coverage"); const inputs: ProcessCov[] = [ blockCoverage, functionCoverage, ]; const expected: ProcessCov = loadFixture("issue-2-ex...
Code excerptlines 110-120, bytes 3775-4297 // see: https://github.com/demurgos/v8-coverage/issues/2\nit("handles block coverage merged into function coverage", () => { const blockCoverage: ProcessCov = loadFixture("issue-2-block-coverage"); const functionCoverage: ProcessCov = loadFixture("issue-2-func-coverage"); const inputs: ProcessCov[] = [ blockCoverage, functionCoverage, ]; const expected: ProcessCov = loadFixture("issue-2-ex...\n});it("accepts arrays with a single item for `mergeScriptCovs`", () => { const inputs: ScriptCov[] = [ { scriptId: "123", url: "/lib.js", functions: [ { functionName: "test", isBlockCoverage: true, ranges: [ {startOffset: 0, endOffset: 4, count: 2}, {startOffset: 1, en...
Code excerptlines 123-157, bytes 4312-5357 it("accepts arrays with a single item for `mergeScriptCovs`", () => { const inputs: ScriptCov[] = [ { scriptId: "123", url: "/lib.js", functions: [ { functionName: "test", isBlockCoverage: true, ranges: [ {startOffset: 0, endOffset: 4, count: 2}, {startOffset: 1, en...it("accepts arrays with a single item for `mergeFunctionCovs`", () => { const inputs: FunctionCov[] = [ { functionName: "test", isBlockCoverage: true, ranges: [ {startOffset: 0, endOffset: 4, count: 2}, {startOffset: 1, endOffset: 2, count: 1}, {startOffset: 2, endOffset: 3, count: 1}, ], }, ...
Code excerptlines 159-181, bytes 5364-6131 it("accepts arrays with a single item for `mergeFunctionCovs`", () => { const inputs: FunctionCov[] = [ { functionName: "test", isBlockCoverage: true, ranges: [ {startOffset: 0, endOffset: 4, count: 2}, {startOffset: 1, endOffset: 2, count: 1}, {startOffset: 2, endOffset: 3, count: 1}, ], }, ...\n});describe("ranges", () => { for (const sourceFile of getSourceFiles()) { const relPath: string = path.relative(RANGES_DIR, sourceFile); describe(relPath, () => { const content: string = fs.readFileSync(sourceFile, {encoding: "UTF-8"}); const items: MergeRangeItem[] = JSON.parse(content); for (const item of items) { const test: () => void = () => {...
Code excerptlines 184-211, bytes 6142-7110 describe("ranges", () => { for (const sourceFile of getSourceFiles()) { const relPath: string = path.relative(RANGES_DIR, sourceFile); describe(relPath, () => { const content: string = fs.readFileSync(sourceFile, {encoding: "UTF-8"}); const items: MergeRangeItem[] = JSON.parse(content); for (const item of items) { const test: () => void = () => {...describe("benches", () => { for (const bench of getBenches()) { const BENCHES_TO_SKIP: Set<string> = new Set(); if (process.env.CI === "true") { // Skip very large benchmarks when running continuous integration BENCHES_TO_SKIP.add("node@10.11.0"); BENCHES_TO_SKIP.add("npm@6.4.1"); } const name: string = path.basename(bench); if (BENCHES...
Code excerptlines 213-251, bytes 7115-8797 describe("benches", () => { for (const bench of getBenches()) { const BENCHES_TO_SKIP: Set<string> = new Set(); if (process.env.CI === "true") { // Skip very large benchmarks when running continuous integration BENCHES_TO_SKIP.add("node@10.11.0"); BENCHES_TO_SKIP.add("npm@6.4.1"); } const name: string = path.basename(bench); if (BENCHES...\n});
describe("calledInOrder", function () { beforeEach(function () { sinon.stub(testObject1, "someFunction"); sinon.stub(testObject2, "otherFunction"); sinon.stub(testObject3, "thirdFunction"); testMethod(); }); afterEach(function () { testObject1.someFunction.restore(); testObject2.otherFunction.restore(); testObject3.thirdFunction.r...
Code excerptlines 31-121, bytes 602-3730 describe("calledInOrder", function () { beforeEach(function () { sinon.stub(testObject1, "someFunction"); sinon.stub(testObject2, "otherFunction"); sinon.stub(testObject3, "thirdFunction"); testMethod(); }); afterEach(function () { testObject1.someFunction.restore(); testObject2.otherFunction.restore(); testObject3.thirdFunction.r...beforeEach(function () { sinon.stub(testObject1, "someFunction"); sinon.stub(testObject2, "otherFunction"); sinon.stub(testObject3, "thirdFunction"); testMethod(); });
Code excerptlines 32-37, bytes 646-848 describe("calledInOrder", function () {\nbeforeEach(function () { sinon.stub(testObject1, "someFunction"); sinon.stub(testObject2, "otherFunction"); sinon.stub(testObject3, "thirdFunction"); testMethod(); });\nafterEach(function () {afterEach(function () { testObject1.someFunction.restore(); testObject2.otherFunction.restore(); testObject3.thirdFunction.restore(); });
Code excerptlines 38-42, bytes 854-1018 });\nafterEach(function () { testObject1.someFunction.restore(); testObject2.otherFunction.restore(); testObject3.thirdFunction.restore(); });describe("given single array argument", function () { describe("when stubs were called in expected order", function () { it("returns true", function () { assert.isTrue( calledInOrder([ testObject1.someFunction, testObject2.otherFunction, ]) ); ...
Code excerptlines 44-82, bytes 1025-2430 describe("given single array argument", function () { describe("when stubs were called in expected order", function () { it("returns true", function () { assert.isTrue( calledInOrder([ testObject1.someFunction, testObject2.otherFunction, ]) ); ...describe("when stubs were called in expected order", function () { it("returns true", function () { assert.isTrue( calledInOrder([ testObject1.someFunction, testObject2.otherFunction, ]) ); assert.isTrue( calledInOrder([ ...
Code excerptlines 45-62, bytes 1087-1747 describe("given single array argument", function () {\ndescribe("when stubs were called in expected order", function () { it("returns true", function () { assert.isTrue( calledInOrder([ testObject1.someFunction, testObject2.otherFunction, ]) ); assert.isTrue( calledInOrder([ ...it("returns true", function () { assert.isTrue( calledInOrder([ testObject1.someFunction, testObject2.otherFunction, ]) ); assert.isTrue( calledInOrder([ testObject1.someFunction, test...
Code excerptlines 46-61, bytes 1166-1735 describe("when stubs were called in expected order", function () {\nit("returns true", function () { assert.isTrue( calledInOrder([ testObject1.someFunction, testObject2.otherFunction, ]) ); assert.isTrue( calledInOrder([ testObject1.someFunction, test...\n});describe("when stubs were called in unexpected order", function () { it("returns false", function () { assert.isFalse( calledInOrder([ testObject2.otherFunction, testObject1.someFunction, ]) ); assert.isFalse( calledInOrder(...
Code excerptlines 64-81, bytes 1758-2422 describe("when stubs were called in unexpected order", function () { it("returns false", function () { assert.isFalse( calledInOrder([ testObject2.otherFunction, testObject1.someFunction, ]) ); assert.isFalse( calledInOrder(...\n});it("returns false", function () { assert.isFalse( calledInOrder([ testObject2.otherFunction, testObject1.someFunction, ]) ); assert.isFalse( calledInOrder([ testObject2.otherFunction, ...
Code excerptlines 65-80, bytes 1839-2410 describe("when stubs were called in unexpected order", function () {\nit("returns false", function () { assert.isFalse( calledInOrder([ testObject2.otherFunction, testObject1.someFunction, ]) ); assert.isFalse( calledInOrder([ testObject2.otherFunction, ...\n});describe("given multiple arguments", function () { describe("when stubs were called in expected order", function () { it("returns true", function () { assert.isTrue( calledInOrder( testObject1.someFunction, testObject2.otherFunction ) ); as...
Code excerptlines 84-120, bytes 2437-3726 describe("given multiple arguments", function () { describe("when stubs were called in expected order", function () { it("returns true", function () { assert.isTrue( calledInOrder( testObject1.someFunction, testObject2.otherFunction ) ); as...\n});describe("when stubs were called in expected order", function () { it("returns true", function () { assert.isTrue( calledInOrder( testObject1.someFunction, testObject2.otherFunction ) ); assert.isTrue( calledInOrder( ...
Code excerptlines 85-101, bytes 2496-3099 describe("given multiple arguments", function () {\ndescribe("when stubs were called in expected order", function () { it("returns true", function () { assert.isTrue( calledInOrder( testObject1.someFunction, testObject2.otherFunction ) ); assert.isTrue( calledInOrder( ...it("returns true", function () { assert.isTrue( calledInOrder( testObject1.someFunction, testObject2.otherFunction ) ); assert.isTrue( calledInOrder( testObject1.someFunction, testObje...
Code excerptlines 86-100, bytes 2575-3087 describe("when stubs were called in expected order", function () {\nit("returns true", function () { assert.isTrue( calledInOrder( testObject1.someFunction, testObject2.otherFunction ) ); assert.isTrue( calledInOrder( testObject1.someFunction, testObje...\n});describe("when stubs were called in unexpected order", function () { it("returns false", function () { assert.isFalse( calledInOrder( testObject2.otherFunction, testObject1.someFunction ) ); assert.isFalse( calledInOrder( ...
Code excerptlines 103-119, bytes 3110-3718 describe("when stubs were called in unexpected order", function () { it("returns false", function () { assert.isFalse( calledInOrder( testObject2.otherFunction, testObject1.someFunction ) ); assert.isFalse( calledInOrder( ...\n});it("returns false", function () { assert.isFalse( calledInOrder( testObject2.otherFunction, testObject1.someFunction ) ); assert.isFalse( calledInOrder( testObject2.otherFunction, test...
Code excerptlines 104-118, bytes 3191-3706 describe("when stubs were called in unexpected order", function () {\nit("returns false", function () { assert.isFalse( calledInOrder( testObject2.otherFunction, testObject1.someFunction ) ); assert.isFalse( calledInOrder( testObject2.otherFunction, test...\n});
describe("className", function () { it("returns the class name of an instance", function () { // Because eslint-config-sinon disables es6, we can't // use a class definition here // https://github.com/sinonjs/eslint-config-sinon/blob/master/index.js // var instance = new (class TestClass {})(); var instance = new (function TestClass() {})(); var ...
Code excerptlines 7-37, bytes 145-1320 describe("className", function () { it("returns the class name of an instance", function () { // Because eslint-config-sinon disables es6, we can't // use a class definition here // https://github.com/sinonjs/eslint-config-sinon/blob/master/index.js // var instance = new (class TestClass {})(); var instance = new (function TestClass() {})(); var ...it("returns the class name of an instance", function () { // Because eslint-config-sinon disables es6, we can't // use a class definition here // https://github.com/sinonjs/eslint-config-sinon/blob/master/index.js // var instance = new (class TestClass {})(); var instance = new (function TestClass() {})(); var name = className(instance); ...
Code excerptlines 8-16, bytes 185-621 describe("className", function () {\nit("returns the class name of an instance", function () { // Because eslint-config-sinon disables es6, we can't // use a class definition here // https://github.com/sinonjs/eslint-config-sinon/blob/master/index.js // var instance = new (class TestClass {})(); var instance = new (function TestClass() {})(); var name = className(instance); ...it("returns 'Object' for {}", function () { var name = className({}); assert.equals(name, "Object"); });
Code excerptlines 18-21, bytes 628-751 it("returns 'Object' for {}", function () { var name = className({}); assert.equals(name, "Object"); });it("returns null for an object that has no prototype", function () { var obj = Object.create(null); var name = className(obj); assert.equals(name, null); });
Code excerptlines 23-27, bytes 758-942 it("returns null for an object that has no prototype", function () { var obj = Object.create(null); var name = className(obj); assert.equals(name, null); });it("returns null for an object whose prototype was mangled", function () { // This is what Node v6 and v7 do for objects returned by querystring.parse() function MangledObject() {} MangledObject.prototype = Object.create(null); var obj = new MangledObject(); var name = className(obj); assert.equals(name, null); });
Code excerptlines 29-36, bytes 949-1316 it("returns null for an object whose prototype was mangled", function () { // This is what Node v6 and v7 do for objects returned by querystring.parse() function MangledObject() {} MangledObject.prototype = Object.create(null); var obj = new MangledObject(); var name = className(obj); assert.equals(name, null); });\n});
describe("deprecated", function () { describe("defaultMsg", function () { it("should return a string", function () { assert.equals( deprecated.defaultMsg("sinon", "someFunc"), "sinon.someFunc is deprecated and will be removed from the public API in a future version of sinon." ); }); }); describe("printWarning", fu...
Code excerptlines 11-101, bytes 218-3501 describe("deprecated", function () { describe("defaultMsg", function () { it("should return a string", function () { assert.equals( deprecated.defaultMsg("sinon", "someFunc"), "sinon.someFunc is deprecated and will be removed from the public API in a future version of sinon." ); }); }); describe("printWarning", fu...describe("defaultMsg", function () { it("should return a string", function () { assert.equals( deprecated.defaultMsg("sinon", "someFunc"), "sinon.someFunc is deprecated and will be removed from the public API in a future version of sinon." ); }); });
Code excerptlines 12-19, bytes 259-584 describe("deprecated", function () {\ndescribe("defaultMsg", function () { it("should return a string", function () { assert.equals( deprecated.defaultMsg("sinon", "someFunc"), "sinon.someFunc is deprecated and will be removed from the public API in a future version of sinon." ); }); });it("should return a string", function () { assert.equals( deprecated.defaultMsg("sinon", "someFunc"), "sinon.someFunc is deprecated and will be removed from the public API in a future version of sinon." ); });
Code excerptlines 13-18, bytes 304-576 describe("defaultMsg", function () {\nit("should return a string", function () { assert.equals( deprecated.defaultMsg("sinon", "someFunc"), "sinon.someFunc is deprecated and will be removed from the public API in a future version of sinon." ); });\n});describe("printWarning", function () { beforeEach(function () { sinon.replace(process, "emitWarning", sinon.fake()); }); afterEach(sinon.restore); describe("when `process.emitWarning` is defined", function () { it("should call process.emitWarning with a msg", function () { deprecated.printWarning(msg); as...
Code excerptlines 21-59, bytes 591-2057 describe("printWarning", function () { beforeEach(function () { sinon.replace(process, "emitWarning", sinon.fake()); }); afterEach(sinon.restore); describe("when `process.emitWarning` is defined", function () { it("should call process.emitWarning with a msg", function () { deprecated.printWarning(msg); as...beforeEach(function () { sinon.replace(process, "emitWarning", sinon.fake()); });
Code excerptlines 22-24, bytes 638-738 describe("printWarning", function () {\nbeforeEach(function () { sinon.replace(process, "emitWarning", sinon.fake()); });afterEach(sinon.restore)
Code excerptline 26, bytes 749-773 \nafterEach(sinon.restore)\n;describe("when `process.emitWarning` is defined", function () { it("should call process.emitWarning with a msg", function () { deprecated.printWarning(msg); assert.calledOnceWith(process.emitWarning, msg); }); });
Code excerptlines 28-33, bytes 784-1060 describe("when `process.emitWarning` is defined", function () { it("should call process.emitWarning with a msg", function () { deprecated.printWarning(msg); assert.calledOnceWith(process.emitWarning, msg); }); });it("should call process.emitWarning with a msg", function () { deprecated.printWarning(msg); assert.calledOnceWith(process.emitWarning, msg); });
Code excerptlines 29-32, bytes 860-1048 describe("when `process.emitWarning` is defined", function () {\nit("should call process.emitWarning with a msg", function () { deprecated.printWarning(msg); assert.calledOnceWith(process.emitWarning, msg); });\n});describe("when `process.emitWarning` is undefined", function () { beforeEach(function () { sinon.replace(console, "info", sinon.fake()); sinon.replace(console, "log", sinon.fake()); process.emitWarning = undefined; }); afterEach(sinon.restore); describe("when `console.info` is defined", functi...
Code excerptlines 35-58, bytes 1071-2049 describe("when `process.emitWarning` is undefined", function () { beforeEach(function () { sinon.replace(console, "info", sinon.fake()); sinon.replace(console, "log", sinon.fake()); process.emitWarning = undefined; }); afterEach(sinon.restore); describe("when `console.info` is defined", functi...\n});beforeEach(function () { sinon.replace(console, "info", sinon.fake()); sinon.replace(console, "log", sinon.fake()); process.emitWarning = undefined; });
Code excerptlines 36-40, bytes 1149-1360 describe("when `process.emitWarning` is undefined", function () {\nbeforeEach(function () { sinon.replace(console, "info", sinon.fake()); sinon.replace(console, "log", sinon.fake()); process.emitWarning = undefined; });afterEach(sinon.restore)
Code excerptline 42, bytes 1375-1399 \nafterEach(sinon.restore)\n;describe("when `console.info` is defined", function () { it("should call `console.info` with a message", function () { deprecated.printWarning(msg); assert.calledOnceWith(console.info, msg); }); });
Code excerptlines 44-49, bytes 1414-1695 describe("when `console.info` is defined", function () { it("should call `console.info` with a message", function () { deprecated.printWarning(msg); assert.calledOnceWith(console.info, msg); }); });it("should call `console.info` with a message", function () { deprecated.printWarning(msg); assert.calledOnceWith(console.info, msg); });
Code excerptlines 45-48, bytes 1487-1679 describe("when `console.info` is defined", function () {\nit("should call `console.info` with a message", function () { deprecated.printWarning(msg); assert.calledOnceWith(console.info, msg); });\n});describe("when `console.info` is undefined", function () { it("should call `console.log` with a message", function () { console.info = undefined; deprecated.printWarning(msg); assert.calledOnceWith(console.log, msg); }); });
Code excerptlines 51-57, bytes 1710-2037 describe("when `console.info` is undefined", function () { it("should call `console.log` with a message", function () { console.info = undefined; deprecated.printWarning(msg); assert.calledOnceWith(console.log, msg); }); });\n});it("should call `console.log` with a message", function () { console.info = undefined; deprecated.printWarning(msg); assert.calledOnceWith(console.log, msg); });
Code excerptlines 52-56, bytes 1785-2021 describe("when `console.info` is undefined", function () {\nit("should call `console.log` with a message", function () { console.info = undefined; deprecated.printWarning(msg); assert.calledOnceWith(console.log, msg); });\n});describe("wrap", function () { // eslint-disable-next-line mocha/no-setup-in-describe var method = sinon.fake(); var wrapped; beforeEach(function () { wrapped = deprecated.wrap(method, msg); }); it("should return a wrapper function", function () { assert.match(wrapped, sinon.match.func); }); it("should a...
Code excerptlines 61-100, bytes 2064-3497 describe("wrap", function () { // eslint-disable-next-line mocha/no-setup-in-describe var method = sinon.fake(); var wrapped; beforeEach(function () { wrapped = deprecated.wrap(method, msg); }); it("should return a wrapper function", function () { assert.match(wrapped, sinon.match.func); }); it("should a...\n});beforeEach(function () { wrapped = deprecated.wrap(method, msg); });
Code excerptlines 66-68, bytes 2223-2310 beforeEach(function () { wrapped = deprecated.wrap(method, msg); });it("should return a wrapper function", function () { assert.match(wrapped, sinon.match.func); });
Code excerptlines 70-72, bytes 2321-2437 it("should return a wrapper function", function () { assert.match(wrapped, sinon.match.func); });it("should assign the prototype of the passed method", function () { assert.equals(method.prototype, wrapped.prototype); });
Code excerptlines 74-76, bytes 2448-2591 it("should assign the prototype of the passed method", function () { assert.equals(method.prototype, wrapped.prototype); });it("should not be assigned to the wrapped method", function () { method.prototype = null; wrapped = deprecated.wrap(method, msg); assert.match(wrapped.prototype, sinon.match.object); });
Code excerptlines 79-83, bytes 2682-2927 context("when the passed method has falsy prototype", function () {\nit("should not be assigned to the wrapped method", function () { method.prototype = null; wrapped = deprecated.wrap(method, msg); assert.match(wrapped.prototype, sinon.match.object); });\n});before(function () { sinon.replace(deprecated, "printWarning", sinon.fake()); wrapped({}); });
Code excerptlines 87-90, bytes 3022-3159 context("when invoking the wrapped function", function () {\nbefore(function () { sinon.replace(deprecated, "printWarning", sinon.fake()); wrapped({}); });it("should call `printWarning` before invoking", function () { assert.calledOnceWith(deprecated.printWarning, msg); });
Code excerptlines 92-94, bytes 3174-3320 it("should call `printWarning` before invoking", function () { assert.calledOnceWith(deprecated.printWarning, msg); });it("should invoke the passed method with the given arguments", function () { assert.calledOnceWith(method, {}); });
Code excerptlines 96-98, bytes 3335-3477 it("should invoke the passed method with the given arguments", function () { assert.calledOnceWith(method, {}); });\n});
describe("util/core/every", function () { it("returns true when the callback function returns true for every element in an iterable", function () { var obj = [true, true, true, true]; var allTrue = every(obj, function (val) { return val; }); assert(allTrue); }); it("returns false when the callback function returns false for any element in a...
Code excerptlines 7-41, bytes 156-1266 describe("util/core/every", function () { it("returns true when the callback function returns true for every element in an iterable", function () { var obj = [true, true, true, true]; var allTrue = every(obj, function (val) { return val; }); assert(allTrue); }); it("returns false when the callback function returns false for any element in a...it("returns true when the callback function returns true for every element in an iterable", function () { var obj = [true, true, true, true]; var allTrue = every(obj, function (val) { return val; }); assert(allTrue); });
Code excerptlines 8-15, bytes 202-470 describe("util/core/every", function () {\nit("returns true when the callback function returns true for every element in an iterable", function () { var obj = [true, true, true, true]; var allTrue = every(obj, function (val) { return val; }); assert(allTrue); });it("returns false when the callback function returns false for any element in an iterable", function () { var obj = [true, true, true, false]; var result = every(obj, function (val) { return val; }); assert.isFalse(result); });
Code excerptlines 17-24, bytes 477-752 it("returns false when the callback function returns false for any element in an iterable", function () { var obj = [true, true, true, false]; var result = every(obj, function (val) { return val; }); assert.isFalse(result); });it("calls the given callback once for each item in an iterable until it returns false", function () { var iterableOne = [true, true, true, true]; var iterableTwo = [true, true, false, true]; var callback = sinon.spy(function (val) { return val; }); every(iterableOne, callback); assert.equals(callback.callCount, 4); callback....
Code excerptlines 26-40, bytes 759-1262 it("calls the given callback once for each item in an iterable until it returns false", function () { var iterableOne = [true, true, true, true]; var iterableTwo = [true, true, false, true]; var callback = sinon.spy(function (val) { return val; }); every(iterableOne, callback); assert.equals(callback.callCount, 4); callback....\n});
describe("function-name", function () { it("should return empty string if func is falsy", function () { jsc.assertForall("falsy", function (fn) { return functionName(fn) === ""; }); }); it("should use displayName by default", function () { jsc.assertForall("nestring", function (displayName) { var fn = { displayName: displayName }; ...
Code excerptlines 8-76, bytes 150-2124 describe("function-name", function () { it("should return empty string if func is falsy", function () { jsc.assertForall("falsy", function (fn) { return functionName(fn) === ""; }); }); it("should use displayName by default", function () { jsc.assertForall("nestring", function (displayName) { var fn = { displayName: displayName }; ...it("should return empty string if func is falsy", function () { jsc.assertForall("falsy", function (fn) { return functionName(fn) === ""; }); });
Code excerptlines 9-13, bytes 194-370 describe("function-name", function () {\nit("should return empty string if func is falsy", function () { jsc.assertForall("falsy", function (fn) { return functionName(fn) === ""; }); });it("should use displayName by default", function () { jsc.assertForall("nestring", function (displayName) { var fn = { displayName: displayName }; return functionName(fn) === fn.displayName; }); });
Code excerptlines 15-21, bytes 377-619 it("should use displayName by default", function () { jsc.assertForall("nestring", function (displayName) { var fn = { displayName: displayName }; return functionName(fn) === fn.displayName; }); });it("should use name if displayName is not available", function () { jsc.assertForall("nestring", function (name) { var fn = { name: name }; return functionName(fn) === fn.name; }); });
Code excerptlines 23-29, bytes 626-854 it("should use name if displayName is not available", function () { jsc.assertForall("nestring", function (name) { var fn = { name: name }; return functionName(fn) === fn.name; }); });it("should fallback to string parsing", function () { jsc.assertForall("nat", function (naturalNumber) { var name = `fn${naturalNumber}`; var fn = { toString: function () { return `\nfunction ${name}`; }, }; return functionName(fn) === name; }); });
Code excerptlines 31-42, bytes 861-1230 it("should fallback to string parsing", function () { jsc.assertForall("nat", function (naturalNumber) { var name = `fn${naturalNumber}`; var fn = { toString: function () { return `\nfunction ${name}`; }, }; return functionName(fn) === name; }); });it("should not fail when a name cannot be found", function () { refute.exception(function () { var fn = { toString: function () { return "\nfunction ("; }, }; functionName(fn); }); });
Code excerptlines 44-54, bytes 1237-1529 it("should not fail when a name cannot be found", function () { refute.exception(function () { var fn = { toString: function () { return "\nfunction ("; }, }; functionName(fn); }); });it("should not fail when toString is undefined", function () { refute.exception(function () { functionName(Object.create(null)); }); });
Code excerptlines 56-60, bytes 1536-1703 it("should not fail when toString is undefined", function () { refute.exception(function () { functionName(Object.create(null)); }); });it("should not fail when toString throws", function () { refute.exception(function () { var fn; try { // eslint-disable-next-line no-eval fn = eval("(function*() {})")().constructor; } catch (e) { // env doesn't support generators return; } functionName(fn); ...
Code excerptlines 62-75, bytes 1710-2120 it("should not fail when toString throws", function () { refute.exception(function () { var fn; try { // eslint-disable-next-line no-eval fn = eval("(function*() {})")().constructor; } catch (e) { // env doesn't support generators return; } functionName(fn); ...\n});
describe("global", function () { before(function () { if (typeof global === "undefined") { this.skip(); } }); it("is same as global", function () { assert.same(globalObject, global); }); });
Code excerptlines 6-16, bytes 111-353 describe("global", function () { before(function () { if (typeof global === "undefined") { this.skip(); } }); it("is same as global", function () { assert.same(globalObject, global); }); });before(function () { if (typeof global === "undefined") { this.skip(); } });
Code excerptlines 7-11, bytes 148-255 describe("global", function () {\nbefore(function () { if (typeof global === "undefined") { this.skip(); } });it("is same as global", function () { assert.same(globalObject, global); });
Code excerptlines 13-15, bytes 262-349 it("is same as global", function () { assert.same(globalObject, global); });\n});
describe("package", function () { // eslint-disable-next-line mocha/no-setup-in-describe expectedMethods.forEach(function (name) { it(`should export a method named ${name}`, function () { assert.isFunction(index[name]); }); }); // eslint-disable-next-line mocha/no-setup-in-describe expectedObjectProperties.forEach(function (name) { it(`shoul...
Code excerptlines 17-31, bytes 322-844 describe("package", function () { // eslint-disable-next-line mocha/no-setup-in-describe expectedMethods.forEach(function (name) { it(`should export a method named ${name}`, function () { assert.isFunction(index[name]); }); }); // eslint-disable-next-line mocha/no-setup-in-describe expectedObjectProperties.forEach(function (name) { it(`shoul...it(`should export a method named ${name}`, function () { assert.isFunction(index[name]); });
Code excerptlines 20-22, bytes 469-580 expectedMethods.forEach(function (name) {\nit(`should export a method named ${name}`, function () { assert.isFunction(index[name]); });\n});it(`should export an object property named ${name}`, function () { assert.isObject(index[name]); });
Code excerptlines 27-29, bytes 713-832 expectedObjectProperties.forEach(function (name) {\nit(`should export an object property named ${name}`, function () { assert.isObject(index[name]); });\n});
describe("orderByFirstCall", function () { it("should order an Array of spies by the callId of the first call, ascending", function () { // create an array of spies var spies = [ sinon.spy(), sinon.spy(), sinon.spy(), sinon.spy(), sinon.spy(), sinon.spy(), ]; // call all the spies s...
Code excerptlines 8-52, bytes 239-1461 describe("orderByFirstCall", function () { it("should order an Array of spies by the callId of the first call, ascending", function () { // create an array of spies var spies = [ sinon.spy(), sinon.spy(), sinon.spy(), sinon.spy(), sinon.spy(), sinon.spy(), ]; // call all the spies s...it("should order an Array of spies by the callId of the first call, ascending", function () { // create an array of spies var spies = [ sinon.spy(), sinon.spy(), sinon.spy(), sinon.spy(), sinon.spy(), sinon.spy(), ]; // call all the spies spies.forEach(function (spy) { s...
Code excerptlines 9-51, bytes 286-1457 describe("orderByFirstCall", function () {\nit("should order an Array of spies by the callId of the first call, ascending", function () { // create an array of spies var spies = [ sinon.spy(), sinon.spy(), sinon.spy(), sinon.spy(), sinon.spy(), sinon.spy(), ]; // call all the spies spies.forEach(function (spy) { s...\n});
describe("copyPrototypeMethods", function () { it("does not throw for Map", function () { refute.exception(function () { copyPrototypeMethods(Map.prototype); }); }); });
Code excerptlines 6-12, bytes 135-339 describe("copyPrototypeMethods", function () { it("does not throw for Map", function () { refute.exception(function () { copyPrototypeMethods(Map.prototype); }); }); });it("does not throw for Map", function () { refute.exception(function () { copyPrototypeMethods(Map.prototype); }); });
Code excerptlines 7-11, bytes 186-335 describe("copyPrototypeMethods", function () {\nit("does not throw for Map", function () { refute.exception(function () { copyPrototypeMethods(Map.prototype); }); });\n});
describe("prototypes", function () { describe(".array", function () { // eslint-disable-next-line mocha/no-setup-in-describe verifyProperties(arrayProto, Array); }); describe(".function", function () { // eslint-disable-next-line mocha/no-setup-in-describe verifyProperties(functionProto, Function); }); describe(".map", function () { // es...
Code excerptlines 13-38, bytes 382-1342 describe("prototypes", function () { describe(".array", function () { // eslint-disable-next-line mocha/no-setup-in-describe verifyProperties(arrayProto, Array); }); describe(".function", function () { // eslint-disable-next-line mocha/no-setup-in-describe verifyProperties(functionProto, Function); }); describe(".map", function () { // es...describe(".array", function () { // eslint-disable-next-line mocha/no-setup-in-describe verifyProperties(arrayProto, Array); });
Code excerptlines 14-17, bytes 423-570 describe("prototypes", function () {\ndescribe(".array", function () { // eslint-disable-next-line mocha/no-setup-in-describe verifyProperties(arrayProto, Array); });\ndescribe(".function", function () {describe(".function", function () { // eslint-disable-next-line mocha/no-setup-in-describe verifyProperties(functionProto, Function); });
Code excerptlines 18-21, bytes 576-732 });\ndescribe(".function", function () { // eslint-disable-next-line mocha/no-setup-in-describe verifyProperties(functionProto, Function); });\ndescribe(".map", function () {describe(".map", function () { // eslint-disable-next-line mocha/no-setup-in-describe verifyProperties(mapProto, Map); });
Code excerptlines 22-25, bytes 738-879 });\ndescribe(".map", function () { // eslint-disable-next-line mocha/no-setup-in-describe verifyProperties(mapProto, Map); });\ndescribe(".object", function () {describe(".object", function () { // eslint-disable-next-line mocha/no-setup-in-describe verifyProperties(objectProto, Object); });
Code excerptlines 26-29, bytes 885-1035 });\ndescribe(".object", function () { // eslint-disable-next-line mocha/no-setup-in-describe verifyProperties(objectProto, Object); });\ndescribe(".set", function () {describe(".set", function () { // eslint-disable-next-line mocha/no-setup-in-describe verifyProperties(setProto, Set); });
Code excerptlines 30-33, bytes 1041-1182 });\ndescribe(".set", function () { // eslint-disable-next-line mocha/no-setup-in-describe verifyProperties(setProto, Set); });\ndescribe(".string", function () {describe(".string", function () { // eslint-disable-next-line mocha/no-setup-in-describe verifyProperties(stringProto, String); });
Code excerptlines 34-37, bytes 1188-1338 });\ndescribe(".string", function () { // eslint-disable-next-line mocha/no-setup-in-describe verifyProperties(stringProto, String); });\n});it("should have all the methods of the origin prototype", function () { var methodNames = Object.getOwnPropertyNames(origin.prototype).filter( function (name) { if (disallowedProperties.includes(name)) { return false; } return typeof origin.prototype[name] === "function"; } ); ...
Code excerptlines 46-60, bytes 1542-2074 it("should have all the methods of the origin prototype", function () { var methodNames = Object.getOwnPropertyNames(origin.prototype).filter( function (name) { if (disallowedProperties.includes(name)) { return false; } return typeof origin.prototype[name] === "function"; } ); ...\n}
describe("typeOf", function () { it("returns boolean", function () { assert.equals(typeOf(false), "boolean"); }); it("returns string", function () { assert.equals(typeOf("Sinon.JS"), "string"); }); it("returns number", function () { assert.equals(typeOf(123), "number"); }); it("returns object", function () { assert.equals(typeOf({}), "...
Code excerptlines 6-51, bytes 106-1196 describe("typeOf", function () { it("returns boolean", function () { assert.equals(typeOf(false), "boolean"); }); it("returns string", function () { assert.equals(typeOf("Sinon.JS"), "string"); }); it("returns number", function () { assert.equals(typeOf(123), "number"); }); it("returns object", function () { assert.equals(typeOf({}), "...it("returns boolean", function () { assert.equals(typeOf(false), "boolean"); });
Code excerptlines 7-9, bytes 143-234 describe("typeOf", function () {\nit("returns boolean", function () { assert.equals(typeOf(false), "boolean"); });it("returns string", function () { assert.equals(typeOf("Sinon.JS"), "string"); });
Code excerptlines 11-13, bytes 241-335 it("returns string", function () { assert.equals(typeOf("Sinon.JS"), "string"); });it("returns number", function () { assert.equals(typeOf(123), "number"); });
Code excerptlines 15-17, bytes 342-429 it("returns number", function () { assert.equals(typeOf(123), "number"); });it("returns object", function () { assert.equals(typeOf({}), "object"); });
Code excerptlines 19-21, bytes 436-522 it("returns object", function () { assert.equals(typeOf({}), "object"); });it("returns function", function () { assert.equals( typeOf(function () { return undefined; }), "function" ); });
Code excerptlines 23-30, bytes 529-712 it("returns function", function () { assert.equals( typeOf(function () { return undefined; }), "function" ); });it("returns undefined", function () { assert.equals(typeOf(undefined), "undefined"); });
Code excerptlines 32-34, bytes 719-818 it("returns undefined", function () { assert.equals(typeOf(undefined), "undefined"); });it("returns null", function () { assert.equals(typeOf(null), "null"); });
Code excerptlines 36-38, bytes 825-909 it("returns null", function () { assert.equals(typeOf(null), "null"); });it("returns array", function () { assert.equals(typeOf([]), "array"); });
Code excerptlines 40-42, bytes 916-1000 it("returns array", function () { assert.equals(typeOf([]), "array"); });it("returns regexp", function () { assert.equals(typeOf(/.*/), "regexp"); });
Code excerptlines 44-46, bytes 1007-1095 it("returns regexp", function () { assert.equals(typeOf(/.*/), "regexp"); });it("returns date", function () { assert.equals(typeOf(new Date()), "date"); });
Code excerptlines 48-50, bytes 1102-1192 it("returns date", function () { assert.equals(typeOf(new Date()), "date"); });\n});
describe("util/core/valueToString", function () { it("returns string representation of an object", function () { var obj = {}; assert.equals(valueToString(obj), obj.toString()); }); it("returns 'null' for literal null'", function () { assert.equals(valueToString(null), "null"); }); it("returns 'undefined' for literal undefined", function () { ...
Code excerptlines 6-20, bytes 121-585 describe("util/core/valueToString", function () { it("returns string representation of an object", function () { var obj = {}; assert.equals(valueToString(obj), obj.toString()); }); it("returns 'null' for literal null'", function () { assert.equals(valueToString(null), "null"); }); it("returns 'undefined' for literal undefined", function () { ...it("returns string representation of an object", function () { var obj = {}; assert.equals(valueToString(obj), obj.toString()); });
Code excerptlines 7-11, bytes 175-326 describe("util/core/valueToString", function () {\nit("returns string representation of an object", function () { var obj = {}; assert.equals(valueToString(obj), obj.toString()); });it("returns 'null' for literal null'", function () { assert.equals(valueToString(null), "null"); });
Code excerptlines 13-15, bytes 333-444 it("returns 'null' for literal null'", function () { assert.equals(valueToString(null), "null"); });it("returns 'undefined' for literal undefined", function () { assert.equals(valueToString(undefined), "undefined"); });
Code excerptlines 17-19, bytes 451-581 it("returns 'undefined' for literal undefined", function () { assert.equals(valueToString(undefined), "undefined"); });\n});
describe('CSSStyleDeclaration', () => { test('has only valid properties implemented', () => { expect(invalidProperties.length).toEqual(0); }); test('has all properties', () => { var style = new CSSStyleDeclaration(); allProperties.forEach(property => { expect(style.__lookupGetter__(property)).toBeTruthy(); expect(style.__lookupSetter__(property)).toBeTruthy(); })...
Code excerptlines 15-556, bytes 614-21696 describe('CSSStyleDeclaration', () => { test('has only valid properties implemented', () => { expect(invalidProperties.length).toEqual(0); }); test('has all properties', () => { var style = new CSSStyleDeclaration(); allProperties.forEach(property => { expect(style.__lookupGetter__(property)).toBeTruthy(); expect(style.__lookupSetter__(property)).toBeTruthy(); })...test('has only valid properties implemented', () => { expect(invalidProperties.length).toEqual(0); });
Code excerptlines 16-18, bytes 656-763 describe('CSSStyleDeclaration', () => {\ntest('has only valid properties implemented', () => { expect(invalidProperties.length).toEqual(0); });test('has all properties', () => { var style = new CSSStyleDeclaration(); allProperties.forEach(property => { expect(style.__lookupGetter__(property)).toBeTruthy(); expect(style.__lookupSetter__(property)).toBeTruthy(); }); });
Code excerptlines 20-26, bytes 768-1020 test('has all properties', () => { var style = new CSSStyleDeclaration(); allProperties.forEach(property => { expect(style.__lookupGetter__(property)).toBeTruthy(); expect(style.__lookupSetter__(property)).toBeTruthy(); }); });test('has dashed properties', () => { var style = new CSSStyleDeclaration(); dashedProperties.forEach(property => { expect(style.__lookupGetter__(property)).toBeTruthy(); expect(style.__lookupSetter__(property)).toBeTruthy(); }); });
Code excerptlines 28-34, bytes 1025-1283 test('has dashed properties', () => { var style = new CSSStyleDeclaration(); dashedProperties.forEach(property => { expect(style.__lookupGetter__(property)).toBeTruthy(); expect(style.__lookupSetter__(property)).toBeTruthy(); }); });test('has all functions', () => { var style = new CSSStyleDeclaration(); expect(typeof style.item).toEqual('function'); expect(typeof style.getPropertyValue).toEqual('function'); expect(typeof style.setProperty).toEqual('function'); expect(typeof style.getPropertyPriority).toEqual('function'); expect(typeof style.removeProperty).toEqual('function'); // TODO - deprec...
Code excerptlines 36-47, bytes 1288-1821 test('has all functions', () => { var style = new CSSStyleDeclaration(); expect(typeof style.item).toEqual('function'); expect(typeof style.getPropertyValue).toEqual('function'); expect(typeof style.setProperty).toEqual('function'); expect(typeof style.getPropertyPriority).toEqual('function'); expect(typeof style.removeProperty).toEqual('function'); // TODO - deprec...test('has special properties', () => { var style = new CSSStyleDeclaration(); expect(style.__lookupGetter__('cssText')).toBeTruthy(); expect(style.__lookupSetter__('cssText')).toBeTruthy(); expect(style.__lookupGetter__('length')).toBeTruthy(); expect(style.__lookupSetter__('length')).toBeTruthy(); expect(style.__lookupGetter__('parentRule')).toBeTruthy(); });
Code excerptlines 49-57, bytes 1826-2214 test('has special properties', () => { var style = new CSSStyleDeclaration(); expect(style.__lookupGetter__('cssText')).toBeTruthy(); expect(style.__lookupSetter__('cssText')).toBeTruthy(); expect(style.__lookupGetter__('length')).toBeTruthy(); expect(style.__lookupSetter__('length')).toBeTruthy(); expect(style.__lookupGetter__('parentRule')).toBeTruthy(); });test('from style string', () => { var style = new CSSStyleDeclaration(); style.cssText = 'color: blue; background-color: red; width: 78%; height: 50vh;'; expect(style.length).toEqual(4); expect(style.cssText).toEqual('color: blue; background-color: red; width: 78%; height: 50vh;'); expect(style.getPropertyValue('color')).toEqual('blue'); expect(style.item(0)).toEqual('col...
Code excerptlines 59-71, bytes 2219-2827 test('from style string', () => { var style = new CSSStyleDeclaration(); style.cssText = 'color: blue; background-color: red; width: 78%; height: 50vh;'; expect(style.length).toEqual(4); expect(style.cssText).toEqual('color: blue; background-color: red; width: 78%; height: 50vh;'); expect(style.getPropertyValue('color')).toEqual('blue'); expect(style.item(0)).toEqual('col...test('from properties', () => { var style = new CSSStyleDeclaration(); style.color = 'blue'; expect(style.length).toEqual(1); expect(style[0]).toEqual('color'); expect(style.cssText).toEqual('color: blue;'); expect(style.item(0)).toEqual('color'); expect(style.color).toEqual('blue'); style.backgroundColor = 'red'; expect(style.length).toEqual(2); expect(st...
Code excerptlines 73-89, bytes 2832-3519 test('from properties', () => { var style = new CSSStyleDeclaration(); style.color = 'blue'; expect(style.length).toEqual(1); expect(style[0]).toEqual('color'); expect(style.cssText).toEqual('color: blue;'); expect(style.item(0)).toEqual('color'); expect(style.color).toEqual('blue'); style.backgroundColor = 'red'; expect(style.length).toEqual(2); expect(st...test('shorthand properties', () => { var style = new CSSStyleDeclaration(); style.background = 'blue url(http://www.example.com/some_img.jpg)'; expect(style.backgroundColor).toEqual('blue'); expect(style.backgroundImage).toEqual('url(http://www.example.com/some_img.jpg)'); expect(style.background).toEqual('blue url(http://www.example.com/some_img.jpg)'); style.border = '0...
Code excerptlines 91-107, bytes 3524-4368 test('shorthand properties', () => { var style = new CSSStyleDeclaration(); style.background = 'blue url(http://www.example.com/some_img.jpg)'; expect(style.backgroundColor).toEqual('blue'); expect(style.backgroundImage).toEqual('url(http://www.example.com/some_img.jpg)'); expect(style.background).toEqual('blue url(http://www.example.com/some_img.jpg)'); style.border = '0...test('width and height properties and null and empty strings', () => { var style = new CSSStyleDeclaration(); style.height = 6; expect(style.height).toEqual(''); style.width = 0; expect(style.width).toEqual('0px'); style.height = '34%'; expect(style.height).toEqual('34%'); style.height = '100vh'; expect(style.height).toEqual('100vh'); style.height = '100vw...
Code excerptlines 109-127, bytes 4373-5031 test('width and height properties and null and empty strings', () => { var style = new CSSStyleDeclaration(); style.height = 6; expect(style.height).toEqual(''); style.width = 0; expect(style.width).toEqual('0px'); style.height = '34%'; expect(style.height).toEqual('34%'); style.height = '100vh'; expect(style.height).toEqual('100vh'); style.height = '100vw...test('implicit properties', () => { var style = new CSSStyleDeclaration(); style.borderWidth = 0; expect(style.length).toEqual(1); expect(style.borderWidth).toEqual('0px'); expect(style.borderTopWidth).toEqual('0px'); expect(style.borderBottomWidth).toEqual('0px'); expect(style.borderLeftWidth).toEqual('0px'); expect(style.borderRightWidth).toEqual('0px'); exp...
Code excerptlines 129-139, bytes 5036-5488 test('implicit properties', () => { var style = new CSSStyleDeclaration(); style.borderWidth = 0; expect(style.length).toEqual(1); expect(style.borderWidth).toEqual('0px'); expect(style.borderTopWidth).toEqual('0px'); expect(style.borderBottomWidth).toEqual('0px'); expect(style.borderLeftWidth).toEqual('0px'); expect(style.borderRightWidth).toEqual('0px'); exp...test('top, left, right, bottom properties', () => { var style = new CSSStyleDeclaration(); style.top = 0; style.left = '0%'; style.right = '5em'; style.bottom = '12pt'; expect(style.top).toEqual('0px'); expect(style.left).toEqual('0%'); expect(style.right).toEqual('5em'); expect(style.bottom).toEqual('12pt'); expect(style.length).toEqual(4); expect(sty...
Code excerptlines 141-153, bytes 5493-5965 test('top, left, right, bottom properties', () => { var style = new CSSStyleDeclaration(); style.top = 0; style.left = '0%'; style.right = '5em'; style.bottom = '12pt'; expect(style.top).toEqual('0px'); expect(style.left).toEqual('0%'); expect(style.right).toEqual('5em'); expect(style.bottom).toEqual('12pt'); expect(style.length).toEqual(4); expect(sty...test('clear and clip properties', () => { var style = new CSSStyleDeclaration(); style.clear = 'none'; expect(style.clear).toEqual('none'); style.clear = 'lfet'; expect(style.clear).toEqual('none'); style.clear = 'left'; expect(style.clear).toEqual('left'); style.clear = 'right'; expect(style.clear).toEqual('right'); style.clear = 'both'; expect(style....
Code excerptlines 155-174, bytes 5970-6730 test('clear and clip properties', () => { var style = new CSSStyleDeclaration(); style.clear = 'none'; expect(style.clear).toEqual('none'); style.clear = 'lfet'; expect(style.clear).toEqual('none'); style.clear = 'left'; expect(style.clear).toEqual('left'); style.clear = 'right'; expect(style.clear).toEqual('right'); style.clear = 'both'; expect(style....test('colors', () => { var style = new CSSStyleDeclaration(); style.color = 'rgba(0,0,0,0)'; expect(style.color).toEqual('rgba(0, 0, 0, 0)'); style.color = 'rgba(5%, 10%, 20%, 0.4)'; expect(style.color).toEqual('rgba(12, 25, 51, 0.4)'); style.color = 'rgb(33%, 34%, 33%)'; expect(style.color).toEqual('rgb(84, 86, 84)'); style.color = 'rgba(300, 200, 100, 1.5)'; ...
Code excerptlines 176-202, bytes 6735-7892 test('colors', () => { var style = new CSSStyleDeclaration(); style.color = 'rgba(0,0,0,0)'; expect(style.color).toEqual('rgba(0, 0, 0, 0)'); style.color = 'rgba(5%, 10%, 20%, 0.4)'; expect(style.color).toEqual('rgba(12, 25, 51, 0.4)'); style.color = 'rgb(33%, 34%, 33%)'; expect(style.color).toEqual('rgb(84, 86, 84)'); style.color = 'rgba(300, 200, 100, 1.5)'; ...test('short hand properties with embedded spaces', () => { var style = new CSSStyleDeclaration(); style.background = 'rgb(0, 0, 0) url(/something/somewhere.jpg)'; expect(style.backgroundColor).toEqual('rgb(0, 0, 0)'); expect(style.backgroundImage).toEqual('url(/something/somewhere.jpg)'); expect(style.cssText).toEqual('background: rgb(0, 0, 0) url(/something/somewhere.jpg);')...
Code excerptlines 204-213, bytes 7897-8438 test('short hand properties with embedded spaces', () => { var style = new CSSStyleDeclaration(); style.background = 'rgb(0, 0, 0) url(/something/somewhere.jpg)'; expect(style.backgroundColor).toEqual('rgb(0, 0, 0)'); expect(style.backgroundImage).toEqual('url(/something/somewhere.jpg)'); expect(style.cssText).toEqual('background: rgb(0, 0, 0) url(/something/somewhere.jpg);')...test('setting shorthand properties to an empty string should clear all dependent properties', () => { var style = new CSSStyleDeclaration(); style.borderWidth = '1px'; expect(style.cssText).toEqual('border-width: 1px;'); style.border = ''; expect(style.cssText).toEqual(''); });
Code excerptlines 215-221, bytes 8443-8742 test('setting shorthand properties to an empty string should clear all dependent properties', () => { var style = new CSSStyleDeclaration(); style.borderWidth = '1px'; expect(style.cssText).toEqual('border-width: 1px;'); style.border = ''; expect(style.cssText).toEqual(''); });test('setting implicit properties to an empty string should clear all dependent properties', () => { var style = new CSSStyleDeclaration(); style.borderTopWidth = '1px'; expect(style.cssText).toEqual('border-top-width: 1px;'); style.borderWidth = ''; expect(style.cssText).toEqual(''); });
Code excerptlines 223-229, bytes 8747-9057 test('setting implicit properties to an empty string should clear all dependent properties', () => { var style = new CSSStyleDeclaration(); style.borderTopWidth = '1px'; expect(style.cssText).toEqual('border-top-width: 1px;'); style.borderWidth = ''; expect(style.cssText).toEqual(''); });test('setting a shorthand property, whose shorthands are implicit properties, to an empty string should clear all dependent properties', () => { var style = new CSSStyleDeclaration(); style.borderTopWidth = '1px'; expect(style.cssText).toEqual('border-top-width: 1px;'); style.border = ''; expect(style.cssText).toEqual(''); style.borderTop = '1px solid black'; expect(s...
Code excerptlines 231-241, bytes 9062-9581 test('setting a shorthand property, whose shorthands are implicit properties, to an empty string should clear all dependent properties', () => { var style = new CSSStyleDeclaration(); style.borderTopWidth = '1px'; expect(style.cssText).toEqual('border-top-width: 1px;'); style.border = ''; expect(style.cssText).toEqual(''); style.borderTop = '1px solid black'; expect(s...test('setting border values to "none" should clear dependent values', () => { var style = new CSSStyleDeclaration(); style.borderTopWidth = '1px'; expect(style.cssText).toEqual('border-top-width: 1px;'); style.border = 'none'; expect(style.cssText).toEqual(''); style.borderTopWidth = '1px'; expect(style.cssText).toEqual('border-top-width: 1px;'); style.borderTopSt...
Code excerptlines 243-262, bytes 9586-10451 test('setting border values to "none" should clear dependent values', () => { var style = new CSSStyleDeclaration(); style.borderTopWidth = '1px'; expect(style.cssText).toEqual('border-top-width: 1px;'); style.border = 'none'; expect(style.cssText).toEqual(''); style.borderTopWidth = '1px'; expect(style.cssText).toEqual('border-top-width: 1px;'); style.borderTopSt...test('setting border to 0 should be okay', () => { var style = new CSSStyleDeclaration(); style.border = 0; expect(style.cssText).toEqual('border: 0px;'); });
Code excerptlines 264-268, bytes 10456-10627 test('setting border to 0 should be okay', () => { var style = new CSSStyleDeclaration(); style.border = 0; expect(style.cssText).toEqual('border: 0px;'); });test('setting values implicit and shorthand properties via csstext and setproperty should propagate to dependent properties', () => { var style = new CSSStyleDeclaration(); style.cssText = 'border: 1px solid black;'; expect(style.cssText).toEqual('border: 1px solid black;'); expect(style.borderTop).toEqual('1px solid black'); style.border = ''; expect(style.cssText).toEqu...
Code excerptlines 270-279, bytes 10632-11157 test('setting values implicit and shorthand properties via csstext and setproperty should propagate to dependent properties', () => { var style = new CSSStyleDeclaration(); style.cssText = 'border: 1px solid black;'; expect(style.cssText).toEqual('border: 1px solid black;'); expect(style.borderTop).toEqual('1px solid black'); style.border = ''; expect(style.cssText).toEqu...test('setting opacity should work', () => { var style = new CSSStyleDeclaration(); style.setProperty('opacity', 0.75); expect(style.cssText).toEqual('opacity: 0.75;'); style.opacity = '0.50'; expect(style.cssText).toEqual('opacity: 0.5;'); style.opacity = 1; expect(style.cssText).toEqual('opacity: 1;'); });
Code excerptlines 281-289, bytes 11162-11499 test('setting opacity should work', () => { var style = new CSSStyleDeclaration(); style.setProperty('opacity', 0.75); expect(style.cssText).toEqual('opacity: 0.75;'); style.opacity = '0.50'; expect(style.cssText).toEqual('opacity: 0.5;'); style.opacity = 1; expect(style.cssText).toEqual('opacity: 1;'); });test('width and height of auto should work', () => { var style = new CSSStyleDeclaration(); style.width = 'auto'; expect(style.cssText).toEqual('width: auto;'); expect(style.width).toEqual('auto'); style = new CSSStyleDeclaration(); style.height = 'auto'; expect(style.cssText).toEqual('height: auto;'); expect(style.height).toEqual('auto'); });
Code excerptlines 291-300, bytes 11504-11882 test('width and height of auto should work', () => { var style = new CSSStyleDeclaration(); style.width = 'auto'; expect(style.cssText).toEqual('width: auto;'); expect(style.width).toEqual('auto'); style = new CSSStyleDeclaration(); style.height = 'auto'; expect(style.cssText).toEqual('height: auto;'); expect(style.height).toEqual('auto'); });test('padding and margin should set/clear shorthand properties', () => { var style = new CSSStyleDeclaration(); var parts = ['Top', 'Right', 'Bottom', 'Left']; var testParts = function(name, v, V) { style[name] = v; for (var i = 0; i < 4; i++) { var part = name + parts[i]; expect(style[part]).toEqual(V[i]); } expect(style[name]).toEqual(v); ...
Code excerptlines 302-327, bytes 11887-13140 test('padding and margin should set/clear shorthand properties', () => { var style = new CSSStyleDeclaration(); var parts = ['Top', 'Right', 'Bottom', 'Left']; var testParts = function(name, v, V) { style[name] = v; for (var i = 0; i < 4; i++) { var part = name + parts[i]; expect(style[part]).toEqual(V[i]); } expect(style[name]).toEqual(v); ...test('padding and margin shorthands should set main properties', () => { var style = new CSSStyleDeclaration(); var parts = ['Top', 'Right', 'Bottom', 'Left']; var testParts = function(name, v, V) { var expected; for (var i = 0; i < 4; i++) { style[name] = v; style[name + parts[i]] = V; expected = v.split(/ /); expected[i] = V; expe...
Code excerptlines 329-347, bytes 13145-13794 test('padding and margin shorthands should set main properties', () => { var style = new CSSStyleDeclaration(); var parts = ['Top', 'Right', 'Bottom', 'Left']; var testParts = function(name, v, V) { var expected; for (var i = 0; i < 4; i++) { style[name] = v; style[name + parts[i]] = V; expected = v.split(/ /); expected[i] = V; expe...test('setting a value to 0 should return the string value', () => { var style = new CSSStyleDeclaration(); style.setProperty('fill-opacity', 0); expect(style.fillOpacity).toEqual('0'); });
Code excerptlines 349-353, bytes 13799-14000 test('setting a value to 0 should return the string value', () => { var style = new CSSStyleDeclaration(); style.setProperty('fill-opacity', 0); expect(style.fillOpacity).toEqual('0'); });test('onchange callback should be called when the csstext changes', () => { var style = new CSSStyleDeclaration(function(cssText) { expect(cssText).toEqual('opacity: 0;'); }); style.setProperty('opacity', 0); });
Code excerptlines 355-360, bytes 14005-14236 test('onchange callback should be called when the csstext changes', () => { var style = new CSSStyleDeclaration(function(cssText) { expect(cssText).toEqual('opacity: 0;'); }); style.setProperty('opacity', 0); });test('setting float should work the same as cssfloat', () => { var style = new CSSStyleDeclaration(); style.float = 'left'; expect(style.cssFloat).toEqual('left'); });
Code excerptlines 362-366, bytes 14241-14421 test('setting float should work the same as cssfloat', () => { var style = new CSSStyleDeclaration(); style.float = 'left'; expect(style.cssFloat).toEqual('left'); });test('setting improper css to csstext should not throw', () => { var style = new CSSStyleDeclaration(); style.cssText = 'color: '; expect(style.cssText).toEqual(''); style.color = 'black'; style.cssText = 'float: '; expect(style.cssText).toEqual(''); });
Code excerptlines 368-375, bytes 14426-14705 test('setting improper css to csstext should not throw', () => { var style = new CSSStyleDeclaration(); style.cssText = 'color: '; expect(style.cssText).toEqual(''); style.color = 'black'; style.cssText = 'float: '; expect(style.cssText).toEqual(''); });test('url parsing works with quotes', () => { var style = new CSSStyleDeclaration(); style.backgroundImage = 'url(http://some/url/here1.png)'; expect(style.backgroundImage).toEqual('url(http://some/url/here1.png)'); style.backgroundImage = "url('http://some/url/here2.png')"; expect(style.backgroundImage).toEqual('url(http://some/url/here2.png)'); style.backgroundImage = '...
Code excerptlines 377-385, bytes 14710-15224 test('url parsing works with quotes', () => { var style = new CSSStyleDeclaration(); style.backgroundImage = 'url(http://some/url/here1.png)'; expect(style.backgroundImage).toEqual('url(http://some/url/here1.png)'); style.backgroundImage = "url('http://some/url/here2.png')"; expect(style.backgroundImage).toEqual('url(http://some/url/here2.png)'); style.backgroundImage = '...test('setting 0 to a padding or margin works', () => { var style = new CSSStyleDeclaration(); style.padding = 0; expect(style.cssText).toEqual('padding: 0px;'); style.margin = '1em'; style.marginTop = '0'; expect(style.marginTop).toEqual('0px'); });
Code excerptlines 387-394, bytes 15229-15503 test('setting 0 to a padding or margin works', () => { var style = new CSSStyleDeclaration(); style.padding = 0; expect(style.cssText).toEqual('padding: 0px;'); style.margin = '1em'; style.marginTop = '0'; expect(style.marginTop).toEqual('0px'); });test('setting ex units to a padding or margin works', () => { var style = new CSSStyleDeclaration(); style.padding = '1ex'; expect(style.cssText).toEqual('padding: 1ex;'); style.margin = '1em'; style.marginTop = '0.5ex'; expect(style.marginTop).toEqual('0.5ex'); });
Code excerptlines 396-403, bytes 15508-15799 test('setting ex units to a padding or margin works', () => { var style = new CSSStyleDeclaration(); style.padding = '1ex'; expect(style.cssText).toEqual('padding: 1ex;'); style.margin = '1em'; style.marginTop = '0.5ex'; expect(style.marginTop).toEqual('0.5ex'); });test('setting null to background works', () => { var style = new CSSStyleDeclaration(); style.background = 'red'; expect(style.cssText).toEqual('background: red;'); style.background = null; expect(style.cssText).toEqual(''); });
Code excerptlines 405-411, bytes 15804-16053 test('setting null to background works', () => { var style = new CSSStyleDeclaration(); style.background = 'red'; expect(style.cssText).toEqual('background: red;'); style.background = null; expect(style.cssText).toEqual(''); });test('flex properties should keep their values', () => { var style = new CSSStyleDeclaration(); style.flexDirection = 'column'; expect(style.cssText).toEqual('flex-direction: column;'); style.flexDirection = 'row'; expect(style.cssText).toEqual('flex-direction: row;'); });
Code excerptlines 413-419, bytes 16058-16352 test('flex properties should keep their values', () => { var style = new CSSStyleDeclaration(); style.flexDirection = 'column'; expect(style.cssText).toEqual('flex-direction: column;'); style.flexDirection = 'row'; expect(style.cssText).toEqual('flex-direction: row;'); });test('camelcase properties are not assigned with `.setproperty()`', () => { var style = new CSSStyleDeclaration(); style.setProperty('fontSize', '12px'); expect(style.cssText).toEqual(''); });
Code excerptlines 421-425, bytes 16357-16562 test('camelcase properties are not assigned with `.setproperty()`', () => { var style = new CSSStyleDeclaration(); style.setProperty('fontSize', '12px'); expect(style.cssText).toEqual(''); });test('casing is ignored in `.setproperty()`', () => { var style = new CSSStyleDeclaration(); style.setProperty('FoNt-SiZe', '12px'); expect(style.fontSize).toEqual('12px'); expect(style.getPropertyValue('font-size')).toEqual('12px'); });
Code excerptlines 427-432, bytes 16567-16821 test('casing is ignored in `.setproperty()`', () => { var style = new CSSStyleDeclaration(); style.setProperty('FoNt-SiZe', '12px'); expect(style.fontSize).toEqual('12px'); expect(style.getPropertyValue('font-size')).toEqual('12px'); });test('support non string entries in border-spacing', () => { var style = new CSSStyleDeclaration(); style.borderSpacing = 0; expect(style.cssText).toEqual('border-spacing: 0px;'); });
Code excerptlines 434-438, bytes 16826-17022 test('support non string entries in border-spacing', () => { var style = new CSSStyleDeclaration(); style.borderSpacing = 0; expect(style.cssText).toEqual('border-spacing: 0px;'); });test('float should be valid property for `.setproperty()`', () => { var style = new CSSStyleDeclaration(); style.setProperty('float', 'left'); expect(style.float).toEqual('left'); expect(style.getPropertyValue('float')).toEqual('left'); });
Code excerptlines 440-445, bytes 17027-17284 test('float should be valid property for `.setproperty()`', () => { var style = new CSSStyleDeclaration(); style.setProperty('float', 'left'); expect(style.float).toEqual('left'); expect(style.getPropertyValue('float')).toEqual('left'); });test('flex-shrink works', () => { var style = new CSSStyleDeclaration(); style.setProperty('flex-shrink', 0); expect(style.getPropertyValue('flex-shrink')).toEqual('0'); style.setProperty('flex-shrink', 1); expect(style.getPropertyValue('flex-shrink')).toEqual('1'); expect(style.cssText).toEqual('flex-shrink: 1;'); });
Code excerptlines 447-454, bytes 17289-17634 test('flex-shrink works', () => { var style = new CSSStyleDeclaration(); style.setProperty('flex-shrink', 0); expect(style.getPropertyValue('flex-shrink')).toEqual('0'); style.setProperty('flex-shrink', 1); expect(style.getPropertyValue('flex-shrink')).toEqual('1'); expect(style.cssText).toEqual('flex-shrink: 1;'); });test('flex-grow works', () => { var style = new CSSStyleDeclaration(); style.setProperty('flex-grow', 2); expect(style.getPropertyValue('flex-grow')).toEqual('2'); expect(style.cssText).toEqual('flex-grow: 2;'); });
Code excerptlines 456-461, bytes 17639-17871 test('flex-grow works', () => { var style = new CSSStyleDeclaration(); style.setProperty('flex-grow', 2); expect(style.getPropertyValue('flex-grow')).toEqual('2'); expect(style.cssText).toEqual('flex-grow: 2;'); });test('flex-basis works', () => { var style = new CSSStyleDeclaration(); style.setProperty('flex-basis', 0); expect(style.getPropertyValue('flex-basis')).toEqual('0px'); style.setProperty('flex-basis', '250px'); expect(style.getPropertyValue('flex-basis')).toEqual('250px'); style.setProperty('flex-basis', '10em'); expect(style.getPropertyValue('flex-basis')).toEqual('1...
Code excerptlines 463-474, bytes 17876-18449 test('flex-basis works', () => { var style = new CSSStyleDeclaration(); style.setProperty('flex-basis', 0); expect(style.getPropertyValue('flex-basis')).toEqual('0px'); style.setProperty('flex-basis', '250px'); expect(style.getPropertyValue('flex-basis')).toEqual('250px'); style.setProperty('flex-basis', '10em'); expect(style.getPropertyValue('flex-basis')).toEqual('1...test('shorthand flex works', () => { var style = new CSSStyleDeclaration(); style.setProperty('flex', 'none'); expect(style.getPropertyValue('flex-grow')).toEqual('0'); expect(style.getPropertyValue('flex-shrink')).toEqual('0'); expect(style.getPropertyValue('flex-basis')).toEqual('auto'); style.removeProperty('flex'); style.removeProperty('flex-basis'); style.set...
Code excerptlines 476-510, bytes 18454-20220 test('shorthand flex works', () => { var style = new CSSStyleDeclaration(); style.setProperty('flex', 'none'); expect(style.getPropertyValue('flex-grow')).toEqual('0'); expect(style.getPropertyValue('flex-shrink')).toEqual('0'); expect(style.getPropertyValue('flex-basis')).toEqual('auto'); style.removeProperty('flex'); style.removeProperty('flex-basis'); style.set...test('font-size get a valid value', () => { var style = new CSSStyleDeclaration(); const invalidValue = '1r5px'; style.cssText = 'font-size: 15px'; expect(1).toEqual(style.length); style.cssText = `font-size: ${invalidValue}`; expect(0).toEqual(style.length); expect(undefined).toEqual(style[0]); });
Code excerptlines 512-520, bytes 20225-20554 test('font-size get a valid value', () => { var style = new CSSStyleDeclaration(); const invalidValue = '1r5px'; style.cssText = 'font-size: 15px'; expect(1).toEqual(style.length); style.cssText = `font-size: ${invalidValue}`; expect(0).toEqual(style.length); expect(undefined).toEqual(style[0]); });test('getPropertyValue for custom properties in cssText', () => { const style = new CSSStyleDeclaration(); style.cssText = '--foo: red'; expect(style.getPropertyValue('--foo')).toEqual('red'); });
Code excerptlines 522-527, bytes 20559-20769 test('getPropertyValue for custom properties in cssText', () => { const style = new CSSStyleDeclaration(); style.cssText = '--foo: red'; expect(style.getPropertyValue('--foo')).toEqual('red'); });test('getPropertyValue for custom properties with setProperty', () => { const style = new CSSStyleDeclaration(); style.setProperty('--bar', 'blue'); expect(style.getPropertyValue('--bar')).toEqual('blue'); });
Code excerptlines 529-534, bytes 20774-20997 test('getPropertyValue for custom properties with setProperty', () => { const style = new CSSStyleDeclaration(); style.setProperty('--bar', 'blue'); expect(style.getPropertyValue('--bar')).toEqual('blue'); });test('getPropertyValue for custom properties with object setter', () => { const style = new CSSStyleDeclaration(); style['--baz'] = 'yellow'; expect(style.getPropertyValue('--baz')).toEqual(''); });
Code excerptlines 536-541, bytes 21002-21214 test('getPropertyValue for custom properties with object setter', () => { const style = new CSSStyleDeclaration(); style['--baz'] = 'yellow'; expect(style.getPropertyValue('--baz')).toEqual(''); });test('custom properties are case-sensitive', () => { const style = new CSSStyleDeclaration(); style.cssText = '--fOo: purple'; expect(style.getPropertyValue('--foo')).toEqual(''); expect(style.getPropertyValue('--fOo')).toEqual('purple'); });
Code excerptlines 543-549, bytes 21219-21479 test('custom properties are case-sensitive', () => { const style = new CSSStyleDeclaration(); style.cssText = '--fOo: purple'; expect(style.getPropertyValue('--foo')).toEqual(''); expect(style.getPropertyValue('--fOo')).toEqual('purple'); });test('supports calc', () => { const style = new CSSStyleDeclaration(); style.setProperty('width', 'calc(100% - 100px)'); expect(style.getPropertyValue('width')).toEqual('calc(100% - 100px)'); });
Code excerptlines 551-555, bytes 21484-21692 test('supports calc', () => { const style = new CSSStyleDeclaration(); style.setProperty('width', 'calc(100% - 100px)'); expect(style.getPropertyValue('width')).toEqual('calc(100% - 100px)'); });\n});
describe('valueType', () => { it('returns color for red', () => { let input = 'red'; let output = parsers.valueType(input); expect(output).toEqual(parsers.TYPES.COLOR); }); it('returns color for #nnnnnn', () => { let input = '#fefefe'; let output = parsers.valueType(input); expect(output).toEqual(parsers.TYPES.COLOR); }); it('returns color for rgb(n, n, n)', (...
Code excerptlines 5-75, bytes 54-1941 describe('valueType', () => { it('returns color for red', () => { let input = 'red'; let output = parsers.valueType(input); expect(output).toEqual(parsers.TYPES.COLOR); }); it('returns color for #nnnnnn', () => { let input = '#fefefe'; let output = parsers.valueType(input); expect(output).toEqual(parsers.TYPES.COLOR); }); it('returns color for rgb(n, n, n)', (...\ndescribe('parseInteger', () => {it('returns color for red', () => { let input = 'red'; let output = parsers.valueType(input); expect(output).toEqual(parsers.TYPES.COLOR); });
Code excerptlines 6-11, bytes 86-242 describe('valueType', () => {\nit('returns color for red', () => { let input = 'red'; let output = parsers.valueType(input); expect(output).toEqual(parsers.TYPES.COLOR); });it('returns color for #nnnnnn', () => { let input = '#fefefe'; let output = parsers.valueType(input); expect(output).toEqual(parsers.TYPES.COLOR); });
Code excerptlines 13-18, bytes 247-411 it('returns color for #nnnnnn', () => { let input = '#fefefe'; let output = parsers.valueType(input); expect(output).toEqual(parsers.TYPES.COLOR); });it('returns color for rgb(n, n, n)', () => { let input = 'rgb(10, 10, 10)'; let output = parsers.valueType(input); expect(output).toEqual(parsers.TYPES.COLOR); });
Code excerptlines 20-25, bytes 416-593 it('returns color for rgb(n, n, n)', () => { let input = 'rgb(10, 10, 10)'; let output = parsers.valueType(input); expect(output).toEqual(parsers.TYPES.COLOR); });it('returns color for rgb(p, p, p)', () => { let input = 'rgb(10%, 10%, 10%)'; let output = parsers.valueType(input); expect(output).toEqual(parsers.TYPES.COLOR); });
Code excerptlines 27-32, bytes 598-778 it('returns color for rgb(p, p, p)', () => { let input = 'rgb(10%, 10%, 10%)'; let output = parsers.valueType(input); expect(output).toEqual(parsers.TYPES.COLOR); });it('returns color for rgba(n, n, n, n)', () => { let input = 'rgba(10, 10, 10, 1)'; let output = parsers.valueType(input); expect(output).toEqual(parsers.TYPES.COLOR); });
Code excerptlines 34-39, bytes 783-968 it('returns color for rgba(n, n, n, n)', () => { let input = 'rgba(10, 10, 10, 1)'; let output = parsers.valueType(input); expect(output).toEqual(parsers.TYPES.COLOR); });it('returns color for rgba(n, n, n, n) with decimal alpha', () => { let input = 'rgba(10, 10, 10, 0.5)'; let output = parsers.valueType(input); expect(output).toEqual(parsers.TYPES.COLOR); });
Code excerptlines 41-46, bytes 973-1179 it('returns color for rgba(n, n, n, n) with decimal alpha', () => { let input = 'rgba(10, 10, 10, 0.5)'; let output = parsers.valueType(input); expect(output).toEqual(parsers.TYPES.COLOR); });it('returns color for rgba(p, p, p, n)', () => { let input = 'rgba(10%, 10%, 10%, 1)'; let output = parsers.valueType(input); expect(output).toEqual(parsers.TYPES.COLOR); });
Code excerptlines 48-53, bytes 1184-1372 it('returns color for rgba(p, p, p, n)', () => { let input = 'rgba(10%, 10%, 10%, 1)'; let output = parsers.valueType(input); expect(output).toEqual(parsers.TYPES.COLOR); });it('returns color for rgba(p, p, p, n) with decimal alpha', () => { let input = 'rgba(10%, 10%, 10%, 0.5)'; let output = parsers.valueType(input); expect(output).toEqual(parsers.TYPES.COLOR); });
Code excerptlines 55-60, bytes 1377-1586 it('returns color for rgba(p, p, p, n) with decimal alpha', () => { let input = 'rgba(10%, 10%, 10%, 0.5)'; let output = parsers.valueType(input); expect(output).toEqual(parsers.TYPES.COLOR); });it('returns length for 100ch', () => { let input = '100ch'; let output = parsers.valueType(input); expect(output).toEqual(parsers.TYPES.LENGTH); });
Code excerptlines 62-67, bytes 1591-1753 it('returns length for 100ch', () => { let input = '100ch'; let output = parsers.valueType(input); expect(output).toEqual(parsers.TYPES.LENGTH); });it('returns calc from calc(100px * 2)', () => { let input = 'calc(100px * 2)'; let output = parsers.valueType(input); expect(output).toEqual(parsers.TYPES.CALC); });
Code excerptlines 69-74, bytes 1758-1937 it('returns calc from calc(100px * 2)', () => { let input = 'calc(100px * 2)'; let output = parsers.valueType(input); expect(output).toEqual(parsers.TYPES.CALC); });\n});describe('parseInteger', () => { it.todo('test'); });
Code excerptlines 76-78, bytes 1943-1997 });\ndescribe('parseInteger', () => { it.todo('test'); });\ndescribe('parseNumber', () => {it.todo('test')
Code excerptline 77, bytes 1978-1993 \nit.todo('test')\n;describe('parseNumber', () => { it.todo('test'); });
Code excerptlines 79-81, bytes 1999-2052 });\ndescribe('parseNumber', () => { it.todo('test'); });\ndescribe('parseLength', () => {it.todo('test')
Code excerptline 80, bytes 2033-2048 \nit.todo('test')\n;describe('parseLength', () => { it.todo('test'); });
Code excerptlines 82-84, bytes 2054-2107 });\ndescribe('parseLength', () => { it.todo('test'); });\ndescribe('parsePercent', () => {it.todo('test')
Code excerptline 83, bytes 2088-2103 \nit.todo('test')\n;describe('parsePercent', () => { it.todo('test'); });
Code excerptlines 85-87, bytes 2109-2163 });\ndescribe('parsePercent', () => { it.todo('test'); });\ndescribe('parseMeasurement', () => {it.todo('test')
Code excerptline 86, bytes 2144-2159 \nit.todo('test')\n;describe('parseMeasurement', () => { it.todo('test'); });
Code excerptlines 88-90, bytes 2165-2223 });\ndescribe('parseMeasurement', () => { it.todo('test'); });\ndescribe('parseUrl', () => {it.todo('test')
Code excerptline 89, bytes 2204-2219 \nit.todo('test')\n;describe('parseUrl', () => { it.todo('test'); });
Code excerptlines 91-93, bytes 2225-2275 });\ndescribe('parseUrl', () => { it.todo('test'); });\ndescribe('parseString', () => {it.todo('test')
Code excerptline 92, bytes 2256-2271 \nit.todo('test')\n;describe('parseString', () => { it.todo('test'); });
Code excerptlines 94-96, bytes 2277-2330 });\ndescribe('parseString', () => { it.todo('test'); });\ndescribe('parseColor', () => {it.todo('test')
Code excerptline 95, bytes 2311-2326 \nit.todo('test')\n;describe('parseColor', () => { it('should convert hsl to rgb values', () => { let input = 'hsla(0, 1%, 2%)'; let output = parsers.parseColor(input); expect(output).toEqual('rgb(5, 5, 5)'); }); it('should convert hsla to rgba values', () => { let input = 'hsla(0, 1%, 2%, 0.5)'; let output = parsers.parseColor(input); expect(output).toEqual('rgba(5, 5, 5, 0.5)'); })...
Code excerptlines 97-112, bytes 2332-2766 });\ndescribe('parseColor', () => { it('should convert hsl to rgb values', () => { let input = 'hsla(0, 1%, 2%)'; let output = parsers.parseColor(input); expect(output).toEqual('rgb(5, 5, 5)'); }); it('should convert hsla to rgba values', () => { let input = 'hsla(0, 1%, 2%, 0.5)'; let output = parsers.parseColor(input); expect(output).toEqual('rgba(5, 5, 5, 0.5)'); })...\ndescribe('parseAngle', () => {it('should convert hsl to rgb values', () => { let input = 'hsla(0, 1%, 2%)'; let output = parsers.parseColor(input); expect(output).toEqual('rgb(5, 5, 5)'); });
Code excerptlines 98-103, bytes 2365-2540 describe('parseColor', () => {\nit('should convert hsl to rgb values', () => { let input = 'hsla(0, 1%, 2%)'; let output = parsers.parseColor(input); expect(output).toEqual('rgb(5, 5, 5)'); });\nit('should convert hsla to rgba values', () => {it('should convert hsla to rgba values', () => { let input = 'hsla(0, 1%, 2%, 0.5)'; let output = parsers.parseColor(input); expect(output).toEqual('rgba(5, 5, 5, 0.5)'); });
Code excerptlines 104-109, bytes 2544-2732 });\nit('should convert hsla to rgba values', () => { let input = 'hsla(0, 1%, 2%, 0.5)'; let output = parsers.parseColor(input); expect(output).toEqual('rgba(5, 5, 5, 0.5)'); });it.todo('Add more tests')
Code excerptline 111, bytes 2737-2762 \nit.todo('Add more tests')\n;describe('parseAngle', () => { it.todo('test'); });
Code excerptlines 113-115, bytes 2768-2820 });\ndescribe('parseAngle', () => { it.todo('test'); });\ndescribe('parseKeyword', () => {it.todo('test')
Code excerptline 114, bytes 2801-2816 \nit.todo('test')\n;describe('parseKeyword', () => { it.todo('test'); });
Code excerptlines 116-118, bytes 2822-2876 });\ndescribe('parseKeyword', () => { it.todo('test'); });\ndescribe('dashedToCamelCase', () => {it.todo('test')
Code excerptline 117, bytes 2857-2872 \nit.todo('test')\n;describe('dashedToCamelCase', () => { it.todo('test'); });
Code excerptlines 119-121, bytes 2878-2937 });\ndescribe('dashedToCamelCase', () => { it.todo('test'); });\ndescribe('shorthandParser', () => {it.todo('test')
Code excerptline 120, bytes 2918-2933 \nit.todo('test')\n;describe('shorthandParser', () => { it.todo('test'); });
Code excerptlines 122-124, bytes 2939-2996 });\ndescribe('shorthandParser', () => { it.todo('test'); });\ndescribe('shorthandSetter', () => {it.todo('test')
Code excerptline 123, bytes 2977-2992 \nit.todo('test')\n;describe('shorthandSetter', () => { it.todo('test'); });
Code excerptlines 125-127, bytes 2998-3055 });\ndescribe('shorthandSetter', () => { it.todo('test'); });\ndescribe('shorthandGetter', () => {it.todo('test')
Code excerptline 126, bytes 3036-3051 \nit.todo('test')\n;describe('shorthandGetter', () => { it.todo('test'); });
Code excerptlines 128-130, bytes 3057-3114 });\ndescribe('shorthandGetter', () => { it.todo('test'); });\ndescribe('implicitSetter', () => {it.todo('test')
Code excerptline 129, bytes 3095-3110 \nit.todo('test')\n;describe('implicitSetter', () => { it.todo('test'); });
Code excerptlines 131-133, bytes 3116-3172 });\ndescribe('implicitSetter', () => { it.todo('test'); });\ndescribe('subImplicitSetter', () => {it.todo('test')
Code excerptline 132, bytes 3153-3168 \nit.todo('test')\n;describe('subImplicitSetter', () => { it.todo('test'); });
Code excerptlines 134-136, bytes 3174-3233 });\ndescribe('subImplicitSetter', () => { it.todo('test'); });\ndescribe('camelToDashed', () => {it.todo('test')
Code excerptline 135, bytes 3214-3229 \nit.todo('test')\n;describe('camelToDashed', () => { it.todo('test'); });
Code excerptlines 137-139, bytes 3235-3290 });\ndescribe('camelToDashed', () => { it.todo('test'); });it.todo('test')
Code excerptline 138, bytes 3271-3286 \nit.todo('test')\n;
describe("Decode test", () => { const testcases = [ { input: "&amp;", output: "&" }, { input: "&#38;", output: "&" }, { input: "&#x26;", output: "&" }, { input: "&#X26;", output: "&" }, { input: "&#38;", output: "&" }, { input: "&#38;", output: "&" }, { input: "&#38;", output: "&...
Code excerptlines 4-73, bytes 97-2790 describe("Decode test", () => { const testcases = [ { input: "&amp;", output: "&" }, { input: "&#38;", output: "&" }, { input: "&#x26;", output: "&" }, { input: "&#X26;", output: "&" }, { input: "&#38;", output: "&" }, { input: "&#38;", output: "&" }, { input: "&#38;", output: "&...it("should HTML decode partial legacy entity", () => { expect(entities.decodeHTMLStrict("×bar")).toBe("×bar"); expect(entities.decodeHTML("×bar")).toBe("×bar"); });
Code excerptlines 29-32, bytes 1097-1296 it("should HTML decode partial legacy entity", () => { expect(entities.decodeHTMLStrict("×bar")).toBe("×bar"); expect(entities.decodeHTML("×bar")).toBe("×bar"); });it("should HTML decode legacy entities according to spec", () => expect(entities.decodeHTML("?&image_uri=1&ℑ=2&image=3")).toBe( "?&image_uri=1&ℑ=2&image=3", ));
Code excerptlines 34-37, bytes 1303-1494 it("should HTML decode legacy entities according to spec", () => expect(entities.decodeHTML("?&image_uri=1&ℑ=2&image=3")).toBe( "?&image_uri=1&ℑ=2&image=3", ));it("should back out of legacy entities", () => expect(entities.decodeHTML("&a")).toBe("&a"));
Code excerptlines 39-40, bytes 1501-1604 it("should back out of legacy entities", () => expect(entities.decodeHTML("&a")).toBe("&a"));it("should not parse numeric entities in strict mode", () => expect(entities.decodeHTMLStrict("7")).toBe("7"));
Code excerptlines 42-43, bytes 1611-1735 it("should not parse numeric entities in strict mode", () => expect(entities.decodeHTMLStrict("7")).toBe("7"));it("should parse   followed by < (#852)", () => expect(entities.decodeHTML(" <")).toBe("\u00A0<"));
Code excerptlines 45-46, bytes 1742-1856 it("should parse   followed by < (#852)", () => expect(entities.decodeHTML(" <")).toBe("\u00A0<"));it("should decode trailing legacy entities", () => { expect(entities.decodeHTML("⨱×bar")).toBe("⨱×bar"); });
Code excerptlines 48-50, bytes 1863-1999 it("should decode trailing legacy entities", () => { expect(entities.decodeHTML("⨱×bar")).toBe("⨱×bar"); });it("should decode multi-byte entities", () => { expect(entities.decodeHTML("≧̸")).toBe("≧̸"); });
Code excerptlines 52-54, bytes 2006-2136 it("should decode multi-byte entities", () => { expect(entities.decodeHTML("≧̸")).toBe("≧̸"); });it("should not decode legacy entities followed by text in attribute mode", () => { expect( entities.decodeHTML("¬", entities.DecodingMode.Attribute), ).toBe("¬"); expect( entities.decodeHTML("¬i", entities.DecodingMode.Attribute), ).toBe("¬i"); expect( entities.decodeHTML("¬=", entities.DecodingMode.Attri...
Code excerptlines 56-72, bytes 2143-2786 it("should not decode legacy entities followed by text in attribute mode", () => { expect( entities.decodeHTML("¬", entities.DecodingMode.Attribute), ).toBe("¬"); expect( entities.decodeHTML("¬i", entities.DecodingMode.Attribute), ).toBe("¬i"); expect( entities.decodeHTML("¬=", entities.DecodingMode.Attri...\n});describe("EntityDecoder", () => { it("should decode decimal entities", () => { const callback = vitest.fn(); const decoder = new entities.EntityDecoder( entities.htmlDecodeTree, callback, ); expect(decoder.write("", 1)).toBe(-1); expect(decoder.write("8;", 0)).toBe(5); expect(callback).toHaveBeenCalledTimes(1); ...
Code excerptlines 75-320, bytes 2793-11678 describe("EntityDecoder", () => { it("should decode decimal entities", () => { const callback = vitest.fn(); const decoder = new entities.EntityDecoder( entities.htmlDecodeTree, callback, ); expect(decoder.write("", 1)).toBe(-1); expect(decoder.write("8;", 0)).toBe(5); expect(callback).toHaveBeenCalledTimes(1); ...it("should decode decimal entities", () => { const callback = vitest.fn(); const decoder = new entities.EntityDecoder( entities.htmlDecodeTree, callback, ); expect(decoder.write("", 1)).toBe(-1); expect(decoder.write("8;", 0)).toBe(5); expect(callback).toHaveBeenCalledTimes(1); expect(callback).toHaveBeenCalle...
Code excerptlines 76-88, bytes 2831-3262 describe("EntityDecoder", () => {\nit("should decode decimal entities", () => { const callback = vitest.fn(); const decoder = new entities.EntityDecoder( entities.htmlDecodeTree, callback, ); expect(decoder.write("", 1)).toBe(-1); expect(decoder.write("8;", 0)).toBe(5); expect(callback).toHaveBeenCalledTimes(1); expect(callback).toHaveBeenCalle...it("should decode hex entities", () => { const callback = vitest.fn(); const decoder = new entities.EntityDecoder( entities.htmlDecodeTree, callback, ); expect(decoder.write(":", 1)).toBe(6); expect(callback).toHaveBeenCalledTimes(1); expect(callback).toHaveBeenCalledWith(":".charCodeAt(0), 6); });
Code excerptlines 90-101, bytes 3269-3650 it("should decode hex entities", () => { const callback = vitest.fn(); const decoder = new entities.EntityDecoder( entities.htmlDecodeTree, callback, ); expect(decoder.write(":", 1)).toBe(6); expect(callback).toHaveBeenCalledTimes(1); expect(callback).toHaveBeenCalledWith(":".charCodeAt(0), 6); });it("should decode named entities", () => { const callback = vitest.fn(); const decoder = new entities.EntityDecoder( entities.htmlDecodeTree, callback, ); expect(decoder.write("&", 1)).toBe(5); expect(callback).toHaveBeenCalledTimes(1); expect(callback).toHaveBeenCalledWith("&".charCodeAt(0), 5); });
Code excerptlines 103-114, bytes 3657-4039 it("should decode named entities", () => { const callback = vitest.fn(); const decoder = new entities.EntityDecoder( entities.htmlDecodeTree, callback, ); expect(decoder.write("&", 1)).toBe(5); expect(callback).toHaveBeenCalledTimes(1); expect(callback).toHaveBeenCalledWith("&".charCodeAt(0), 5); });it("should decode legacy entities", () => { const callback = vitest.fn(); const decoder = new entities.EntityDecoder( entities.htmlDecodeTree, callback, ); decoder.startEntity(entities.DecodingMode.Legacy); expect(decoder.write("&", 1)).toBe(-1); expect(callback).toHaveBeenCalledTimes(0); expect(decoder.end()...
Code excerptlines 116-132, bytes 4046-4580 it("should decode legacy entities", () => { const callback = vitest.fn(); const decoder = new entities.EntityDecoder( entities.htmlDecodeTree, callback, ); decoder.startEntity(entities.DecodingMode.Legacy); expect(decoder.write("&", 1)).toBe(-1); expect(callback).toHaveBeenCalledTimes(0); expect(decoder.end()...it("should decode named entity written character by character", () => { const callback = vitest.fn(); const decoder = new entities.EntityDecoder( entities.htmlDecodeTree, callback, ); for (const c of "amp") { expect(decoder.write(c, 0)).toBe(-1); } expect(decoder.write(";", 0)).toBe(5); expect(callbac...
Code excerptlines 134-148, bytes 4587-5087 it("should decode named entity written character by character", () => { const callback = vitest.fn(); const decoder = new entities.EntityDecoder( entities.htmlDecodeTree, callback, ); for (const c of "amp") { expect(decoder.write(c, 0)).toBe(-1); } expect(decoder.write(";", 0)).toBe(5); expect(callbac...it("should decode numeric entity written character by character", () => { const callback = vitest.fn(); const decoder = new entities.EntityDecoder( entities.htmlDecodeTree, callback, ); for (const c of "#x3a") { expect(decoder.write(c, 0)).toBe(-1); } expect(decoder.write(";", 0)).toBe(6); expect(call...
Code excerptlines 150-164, bytes 5094-5597 it("should decode numeric entity written character by character", () => { const callback = vitest.fn(); const decoder = new entities.EntityDecoder( entities.htmlDecodeTree, callback, ); for (const c of "#x3a") { expect(decoder.write(c, 0)).toBe(-1); } expect(decoder.write(";", 0)).toBe(6); expect(call...it("should decode hex entities across several chunks", () => { const callback = vitest.fn(); const decoder = new entities.EntityDecoder( entities.htmlDecodeTree, callback, ); for (const chunk of ["#x", "cf", "ff", "d"]) { expect(decoder.write(chunk, 0)).toBe(-1); } expect(decoder.write(";", 0)).toBe(9); ...
Code excerptlines 166-180, bytes 5604-6113 it("should decode hex entities across several chunks", () => { const callback = vitest.fn(); const decoder = new entities.EntityDecoder( entities.htmlDecodeTree, callback, ); for (const chunk of ["#x", "cf", "ff", "d"]) { expect(decoder.write(chunk, 0)).toBe(-1); } expect(decoder.write(";", 0)).toBe(9); ...it("should not fail if nothing is written", () => { const callback = vitest.fn(); const decoder = new entities.EntityDecoder( entities.htmlDecodeTree, callback, ); expect(decoder.end()).toBe(0); expect(callback).toHaveBeenCalledTimes(0); });
Code excerptlines 182-191, bytes 6120-6429 it("should not fail if nothing is written", () => { const callback = vitest.fn(); const decoder = new entities.EntityDecoder( entities.htmlDecodeTree, callback, ); expect(decoder.end()).toBe(0); expect(callback).toHaveBeenCalledTimes(0); });describe("errors", () => { it("should produce an error for a named entity without a semicolon", () => { const errorHandlers = { missingSemicolonAfterCharacterReference: vitest.fn(), absenceOfDigitsInNumericCharacterReference: vitest.fn(), validateNumericCharacterReference: vitest.fn(), }; const callback...
Code excerptlines 193-319, bytes 6436-11674 describe("errors", () => { it("should produce an error for a named entity without a semicolon", () => { const errorHandlers = { missingSemicolonAfterCharacterReference: vitest.fn(), absenceOfDigitsInNumericCharacterReference: vitest.fn(), validateNumericCharacterReference: vitest.fn(), }; const callback...\n});it("should produce an error for a named entity without a semicolon", () => { const errorHandlers = { missingSemicolonAfterCharacterReference: vitest.fn(), absenceOfDigitsInNumericCharacterReference: vitest.fn(), validateNumericCharacterReference: vitest.fn(), }; const callback = vitest.fn(); con...
Code excerptlines 194-224, bytes 6471-7831 describe("errors", () => {\nit("should produce an error for a named entity without a semicolon", () => { const errorHandlers = { missingSemicolonAfterCharacterReference: vitest.fn(), absenceOfDigitsInNumericCharacterReference: vitest.fn(), validateNumericCharacterReference: vitest.fn(), }; const callback = vitest.fn(); con...it("should produce an error for a numeric entity without a semicolon", () => { const errorHandlers = { missingSemicolonAfterCharacterReference: vitest.fn(), absenceOfDigitsInNumericCharacterReference: vitest.fn(), validateNumericCharacterReference: vitest.fn(), }; const callback = vitest.fn(); c...
Code excerptlines 226-257, bytes 7842-9196 it("should produce an error for a numeric entity without a semicolon", () => { const errorHandlers = { missingSemicolonAfterCharacterReference: vitest.fn(), absenceOfDigitsInNumericCharacterReference: vitest.fn(), validateNumericCharacterReference: vitest.fn(), }; const callback = vitest.fn(); c...it("should produce an error for numeric entities without digits", () => { const errorHandlers = { missingSemicolonAfterCharacterReference: vitest.fn(), absenceOfDigitsInNumericCharacterReference: vitest.fn(), validateNumericCharacterReference: vitest.fn(), }; const callback = vitest.fn(); const ...
Code excerptlines 259-289, bytes 9207-10499 it("should produce an error for numeric entities without digits", () => { const errorHandlers = { missingSemicolonAfterCharacterReference: vitest.fn(), absenceOfDigitsInNumericCharacterReference: vitest.fn(), validateNumericCharacterReference: vitest.fn(), }; const callback = vitest.fn(); const ...it("should produce an error for hex entities without digits", () => { const errorHandlers = { missingSemicolonAfterCharacterReference: vitest.fn(), absenceOfDigitsInNumericCharacterReference: vitest.fn(), validateNumericCharacterReference: vitest.fn(), }; const callback = vitest.fn(); const deco...
Code excerptlines 291-318, bytes 10510-11666 it("should produce an error for hex entities without digits", () => { const errorHandlers = { missingSemicolonAfterCharacterReference: vitest.fn(), absenceOfDigitsInNumericCharacterReference: vitest.fn(), validateNumericCharacterReference: vitest.fn(), }; const callback = vitest.fn(); const deco...\n});
describe("Encode->decode test", () => { const testcases = [ { input: "asdf & ÿ ü '", xml: "asdf & ÿ ü '", html: "asdf & ÿ ü '", }, { input: "&", xml: "&#38;", html: "&#38;", }, ]; for (const { input, xml, html } of testcases...
Code excerptlines 4-61, bytes 88-2483 describe("Encode->decode test", () => { const testcases = [ { input: "asdf & ÿ ü '", xml: "asdf & ÿ ü '", html: "asdf & ÿ ü '", }, { input: "&", xml: "&#38;", html: "&#38;", }, ]; for (const { input, xml, html } of testcases...it("should encode data URIs (issue #16)", () => { const data = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAALAAABAAEAAAIBRAA7"; expect(entities.decode(entities.encode(data))).toBe(data); });
Code excerptlines 41-45, bytes 1601-1834 it("should encode data URIs (issue #16)", () => { const data = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAALAAABAAEAAAIBRAA7"; expect(entities.decode(entities.encode(data))).toBe(data); });it("should HTML encode all ASCII characters", () => { for (let index = 0; index < 128; index++) { const char = String.fromCharCode(index); const encoded = entities.encodeHTML(char); const decoded = entities.decodeHTML(encoded); expect(decoded).toBe(char); } });
Code excerptlines 47-54, bytes 1841-2169 it("should HTML encode all ASCII characters", () => { for (let index = 0; index < 128; index++) { const char = String.fromCharCode(index); const encoded = entities.encodeHTML(char); const decoded = entities.decodeHTML(encoded); expect(decoded).toBe(char); } });it("should encode trailing parts of entities", () => expect(entities.encodeHTML("\uD835")).toBe("�"));
Code excerptlines 56-57, bytes 2176-2292 it("should encode trailing parts of entities", () => expect(entities.encodeHTML("\uD835")).toBe("�"));it("should encode surrogate pair with first surrogate equivalent of entity, without corresponding entity", () => expect(entities.encodeHTML("\u{1D4A4}")).toBe("𝒤"));
Code excerptlines 59-60, bytes 2299-2479 it("should encode surrogate pair with first surrogate equivalent of entity, without corresponding entity", () => expect(entities.encodeHTML("\u{1D4A4}")).toBe("𝒤"));\n});describe("encodeNonAsciiHTML", () => { it("should encode all non-ASCII characters", () => expect(entities.encodeNonAsciiHTML("<test> #123! übermaßen")).toBe( "<test> #123! übermaßen", )); it("should encode emojis", () => expect(entities.encodeNonAsciiHTML("😄🍾🥳💥😇")).toBe( "😄🍾🥳💥😇", ...
Code excerptlines 63-78, bytes 2486-3312 describe("encodeNonAsciiHTML", () => { it("should encode all non-ASCII characters", () => expect(entities.encodeNonAsciiHTML("<test> #123! übermaßen")).toBe( "<test> #123! übermaßen", )); it("should encode emojis", () => expect(entities.encodeNonAsciiHTML("😄🍾🥳💥😇")).toBe( "😄🍾🥳💥😇", ...it("should encode all non-ASCII characters", () => expect(entities.encodeNonAsciiHTML("<test> #123! übermaßen")).toBe( "<test> #123! übermaßen", ));
Code excerptlines 64-67, bytes 2529-2723 describe("encodeNonAsciiHTML", () => {\nit("should encode all non-ASCII characters", () => expect(entities.encodeNonAsciiHTML("<test> #123! übermaßen")).toBe( "<test> #123! übermaßen", ));it("should encode emojis", () => expect(entities.encodeNonAsciiHTML("😄🍾🥳💥😇")).toBe( "😄🍾🥳💥😇", ));
Code excerptlines 69-72, bytes 2730-2908 it("should encode emojis", () => expect(entities.encodeNonAsciiHTML("😄🍾🥳💥😇")).toBe( "😄🍾🥳💥😇", ));it("should encode chars above surrogates", () => expect(entities.encodeNonAsciiHTML("♒️♓️♈️♉️♊️♋️♌️♍️♎️♏️♐️♑️")).toBe( "♒️♓️♈️♉️♊️♋️♌️♍️♎️♏️♐️♑️", ));
Code excerptlines 74-77, bytes 2915-3308 it("should encode chars above surrogates", () => expect(entities.encodeNonAsciiHTML("♒️♓️♈️♉️♊️♋️♌️♍️♎️♏️♐️♑️")).toBe( "♒️♓️♈️♉️♊️♋️♌️♍️♎️♏️♐️♑️", ));\n});
describe("escape HTML", () => { it("should escape HTML attribute values", () => expect(entities.escapeAttribute('<a " attr > & value \u00A0!')).toBe( "<a " attr > & value !", )); it("should escape HTML text", () => expect(entities.escapeText('<a " text > & value \u00A0!')).toBe( '<a " text > & value !', ...
Code excerptlines 4-14, bytes 88-495 describe("escape HTML", () => { it("should escape HTML attribute values", () => expect(entities.escapeAttribute('<a " attr > & value \u00A0!')).toBe( "<a " attr > & value !", )); it("should escape HTML text", () => expect(entities.escapeText('<a " text > & value \u00A0!')).toBe( '<a " text > & value !', ...it("should escape HTML attribute values", () => expect(entities.escapeAttribute('<a " attr > & value \u00A0!')).toBe( "<a " attr > & value !", ));
Code excerptlines 5-8, bytes 124-312 describe("escape HTML", () => {\nit("should escape HTML attribute values", () => expect(entities.escapeAttribute('<a " attr > & value \u00A0!')).toBe( "<a " attr > & value !", ));it("should escape HTML text", () => expect(entities.escapeText('<a " text > & value \u00A0!')).toBe( '<a " text > & value !', ));
Code excerptlines 10-13, bytes 319-491 it("should escape HTML text", () => expect(entities.escapeText('<a " text > & value \u00A0!')).toBe( '<a " text > & value !', ));\n});
describe("Documents", () => { const levelDocuments = levels .map((name) => new URL(`../maps/${name}.json`, import.meta.url)) .map((url) => JSON.parse(readFileSync(url, "utf8"))) .map((document, index) => [index, document]); for (const [level, document] of levelDocuments) { describe("Decode", () => { it(levels[level], () => { for ...
Code excerptlines 8-85, bytes 229-3239 describe("Documents", () => { const levelDocuments = levels .map((name) => new URL(`../maps/${name}.json`, import.meta.url)) .map((url) => JSON.parse(readFileSync(url, "utf8"))) .map((document, index) => [index, document]); for (const [level, document] of levelDocuments) { describe("Decode", () => { it(levels[level], () => { for ...describe("Legacy", () => { const legacyMap: Record<string, string> = legacy; it("should decode", () => { for (const entity of Object.keys(legacyMap)) { expect(entities.decodeHTML(`&${entity}`)).toBe( legacyMap[entity], ); expect( entities.decodeStrict(`&${entity}`, { ...
Code excerptlines 69-84, bytes 2634-3235 describe("Legacy", () => { const legacyMap: Record<string, string> = legacy; it("should decode", () => { for (const entity of Object.keys(legacyMap)) { expect(entities.decodeHTML(`&${entity}`)).toBe( legacyMap[entity], ); expect( entities.decodeStrict(`&${entity}`, { ...\n});it("should decode", () => { for (const entity of Object.keys(legacyMap)) { expect(entities.decodeHTML(`&${entity}`)).toBe( legacyMap[entity], ); expect( entities.decodeStrict(`&${entity}`, { level: entities.EntityLevel.HTML, mode: entities.Deco...
Code excerptlines 71-83, bytes 2727-3227 const legacyMap: Record<string, string> = legacy;\nit("should decode", () => { for (const entity of Object.keys(legacyMap)) { expect(entities.decodeHTML(`&${entity}`)).toBe( legacyMap[entity], ); expect( entities.decodeStrict(`&${entity}`, { level: entities.EntityLevel.HTML, mode: entities.Deco...\n});describe("Astral entities", () => { for (const [c, value] of astral) { it(`should decode ${value}`, () => expect(entities.decode(`&#x${c};`)).toBe(value)); it(`should encode ${value}`, () => expect(entities.encode(value)).toBe(`&#x${c};`)); it(`should escape ${value}`, () => expect(entities.escape(value)).toBe(`&#x${c};`)); } ...
Code excerptlines 97-113, bytes 3401-3966 describe("Astral entities", () => { for (const [c, value] of astral) { it(`should decode ${value}`, () => expect(entities.decode(`&#x${c};`)).toBe(value)); it(`should encode ${value}`, () => expect(entities.encode(value)).toBe(`&#x${c};`)); it(`should escape ${value}`, () => expect(entities.escape(value)).toBe(`&#x${c};`)); } ...describe("Escape", () => { it("should always decode ASCII chars", () => { for (let index = 0; index < 0x7f; index++) { const c = String.fromCharCode(index); expect(entities.decodeXML(entities.escape(c))).toBe(c); } }); it("should keep UTF8 characters", () => expect(entities.escapeUTF8('ß < "ü"')).toBe(`ß < "ü"`)); });
Code excerptlines 115-125, bytes 3969-4365 describe("Escape", () => { it("should always decode ASCII chars", () => { for (let index = 0; index < 0x7f; index++) { const c = String.fromCharCode(index); expect(entities.decodeXML(entities.escape(c))).toBe(c); } }); it("should keep UTF8 characters", () => expect(entities.escapeUTF8('ß < "ü"')).toBe(`ß < "ü"`)); });it("should always decode ASCII chars", () => { for (let index = 0; index < 0x7f; index++) { const c = String.fromCharCode(index); expect(entities.decodeXML(entities.escape(c))).toBe(c); } });
Code excerptlines 116-121, bytes 4000-4234 describe("Escape", () => {\nit("should always decode ASCII chars", () => { for (let index = 0; index < 0x7f; index++) { const c = String.fromCharCode(index); expect(entities.decodeXML(entities.escape(c))).toBe(c); } });it("should keep UTF8 characters", () => expect(entities.escapeUTF8('ß < "ü"')).toBe(`ß < "ü"`));
Code excerptlines 123-124, bytes 4241-4361 it("should keep UTF8 characters", () => expect(entities.escapeUTF8('ß < "ü"')).toBe(`ß < "ü"`));\n});
describe("gensync({})", () => { describe("option validation", () => { test("disallow async and errback handler together", () => { try { gensync({ sync: throwTestError, async: throwTestError, errback: throwTestError, }); throwTestError(); } catch (err) { expect(err.message).toMatch( /Expected one of either op...
Code excerptlines 62-284, bytes 1199-6628 describe("gensync({})", () => { describe("option validation", () => { test("disallow async and errback handler together", () => { try { gensync({ sync: throwTestError, async: throwTestError, errback: throwTestError, }); throwTestError(); } catch (err) { expect(err.message).toMatch( /Expected one of either op...describe("option validation", () => { test("disallow async and errback handler together", () => { try { gensync({ sync: throwTestError, async: throwTestError, errback: throwTestError, }); throwTestError(); } catch (err) { expect(err.message).toMatch( /Expected one of either opts.async or opts.errback, but go...
Code excerptlines 63-109, bytes 1233-2434 describe("gensync({})", () => {\ndescribe("option validation", () => { test("disallow async and errback handler together", () => { try { gensync({ sync: throwTestError, async: throwTestError, errback: throwTestError, }); throwTestError(); } catch (err) { expect(err.message).toMatch( /Expected one of either opts.async or opts.errback, but go...test("disallow async and errback handler together", () => { try { gensync({ sync: throwTestError, async: throwTestError, errback: throwTestError, }); throwTestError(); } catch (err) { expect(err.message).toMatch( /Expected one of either opts.async or opts.errback, but got _both_\./ ); expect(er...
Code excerptlines 64-79, bytes 1275-1724 describe("option validation", () => {\ntest("disallow async and errback handler together", () => { try { gensync({ sync: throwTestError, async: throwTestError, errback: throwTestError, }); throwTestError(); } catch (err) { expect(err.message).toMatch( /Expected one of either opts.async or opts.errback, but got _both_\./ ); expect(er...test("disallow missing sync handler", () => { try { gensync({ async: throwTestError, }); throwTestError(); } catch (err) { expect(err.message).toMatch(/Expected opts.sync to be a function./); expect(err.code).toBe("GENSYNC_OPTIONS_ERROR"); } });
Code excerptlines 81-92, bytes 1731-2048 test("disallow missing sync handler", () => { try { gensync({ async: throwTestError, }); throwTestError(); } catch (err) { expect(err.message).toMatch(/Expected opts.sync to be a function./); expect(err.code).toBe("GENSYNC_OPTIONS_ERROR"); } });test("errback callback required", () => { const fn = gensync({ sync: throwTestError, async: throwTestError, }); try { fn.errback(); throwTestError(); } catch (err) { expect(err.message).toMatch(/function called without callback/); expect(err.code).toBe("GENSYNC_ERRBACK_NO_CALLBACK"); } });
Code excerptlines 94-108, bytes 2055-2428 test("errback callback required", () => { const fn = gensync({ sync: throwTestError, async: throwTestError, }); try { fn.errback(); throwTestError(); } catch (err) { expect(err.message).toMatch(/function called without callback/); expect(err.code).toBe("GENSYNC_ERRBACK_NO_CALLBACK"); } });\n});describe("generator function metadata", () => { test("automatic naming", () => { expect( gensync({ sync: function readFileSync() {}, async: () => {}, }).name ).toBe("readFile"); expect( gensync({ sync: function readFile() {}, async: () => {}, }).name ).toBe("readFile"); expect( gensy...
Code excerptlines 111-201, bytes 2439-4488 describe("generator function metadata", () => { test("automatic naming", () => { expect( gensync({ sync: function readFileSync() {}, async: () => {}, }).name ).toBe("readFile"); expect( gensync({ sync: function readFile() {}, async: () => {}, }).name ).toBe("readFile"); expect( gensy...test("automatic naming", () => { expect( gensync({ sync: function readFileSync() {}, async: () => {}, }).name ).toBe("readFile"); expect( gensync({ sync: function readFile() {}, async: () => {}, }).name ).toBe("readFile"); expect( gensync({ sync: function readFileAsync() {}, ...
Code excerptlines 112-169, bytes 2491-3852 describe("generator function metadata", () => {\ntest("automatic naming", () => { expect( gensync({ sync: function readFileSync() {}, async: () => {}, }).name ).toBe("readFile"); expect( gensync({ sync: function readFile() {}, async: () => {}, }).name ).toBe("readFile"); expect( gensync({ sync: function readFileAsync() {}, ...test("explicit naming", () => { expect( gensync({ name: "readFile", sync: () => {}, async: () => {}, }).name ).toBe("readFile"); });
Code excerptlines 171-179, bytes 3859-4052 test("explicit naming", () => { expect( gensync({ name: "readFile", sync: () => {}, async: () => {}, }).name ).toBe("readFile"); });test("default arity", () => { expect( gensync({ sync: function(a, b, c, d, e, f, g) { throwTestError(); }, async: throwTestError, }).length ).toBe(7); });
Code excerptlines 181-190, bytes 4059-4286 test("default arity", () => { expect( gensync({ sync: function(a, b, c, d, e, f, g) { throwTestError(); }, async: throwTestError, }).length ).toBe(7); });test("explicit arity", () => { expect( gensync({ arity: 3, sync: throwTestError, async: throwTestError, }).length ).toBe(3); });
Code excerptlines 192-200, bytes 4293-4482 test("explicit arity", () => { expect( gensync({ arity: 3, sync: throwTestError, async: throwTestError, }).length ).toBe(3); });\n});describe("'sync' handler", async () => { test("success", async () => { const fn = gensync({ sync: (...args) => JSON.stringify(args), }); await expectResult(fn, 42, { value: "[42]", expectSync: true }); }); test("failure", async () => { const fn = gensync({ sync: (...args) => { throw JSON.stringify(args); }, }); ...
Code excerptlines 203-221, bytes 4493-4968 describe("'sync' handler", async () => { test("success", async () => { const fn = gensync({ sync: (...args) => JSON.stringify(args), }); await expectResult(fn, 42, { value: "[42]", expectSync: true }); }); test("failure", async () => { const fn = gensync({ sync: (...args) => { throw JSON.stringify(args); }, }); ...test("success", async () => { const fn = gensync({ sync: (...args) => JSON.stringify(args), }); await expectResult(fn, 42, { value: "[42]", expectSync: true }); });
Code excerptlines 204-210, bytes 4538-4732 describe("'sync' handler", async () => {\ntest("success", async () => { const fn = gensync({ sync: (...args) => JSON.stringify(args), }); await expectResult(fn, 42, { value: "[42]", expectSync: true }); });test("failure", async () => { const fn = gensync({ sync: (...args) => { throw JSON.stringify(args); }, }); await expectResult(fn, 42, { error: "[42]", expectSync: true }); });
Code excerptlines 212-220, bytes 4739-4962 test("failure", async () => { const fn = gensync({ sync: (...args) => { throw JSON.stringify(args); }, }); await expectResult(fn, 42, { error: "[42]", expectSync: true }); });\n});describe("'async' handler", async () => { test("success", async () => { const fn = gensync({ sync: throwTestError, async: (...args) => Promise.resolve(JSON.stringify(args)), }); await expectResult(fn, 42, { value: "[42]" }); }); test("failure", async () => { const fn = gensync({ sync: throwTestError, async: (...args) => Promis...
Code excerptlines 223-241, bytes 4973-5479 describe("'async' handler", async () => { test("success", async () => { const fn = gensync({ sync: throwTestError, async: (...args) => Promise.resolve(JSON.stringify(args)), }); await expectResult(fn, 42, { value: "[42]" }); }); test("failure", async () => { const fn = gensync({ sync: throwTestError, async: (...args) => Promis...test("success", async () => { const fn = gensync({ sync: throwTestError, async: (...args) => Promise.resolve(JSON.stringify(args)), }); await expectResult(fn, 42, { value: "[42]" }); });
Code excerptlines 224-231, bytes 5019-5243 describe("'async' handler", async () => {\ntest("success", async () => { const fn = gensync({ sync: throwTestError, async: (...args) => Promise.resolve(JSON.stringify(args)), }); await expectResult(fn, 42, { value: "[42]" }); });test("failure", async () => { const fn = gensync({ sync: throwTestError, async: (...args) => Promise.reject(JSON.stringify(args)), }); await expectResult(fn, 42, { error: "[42]" }); });
Code excerptlines 233-240, bytes 5250-5473 test("failure", async () => { const fn = gensync({ sync: throwTestError, async: (...args) => Promise.reject(JSON.stringify(args)), }); await expectResult(fn, 42, { error: "[42]" }); });\n});describe("'errback' sync handler", async () => { test("success", async () => { const fn = gensync({ sync: throwTestError, errback: (...args) => args.pop()(null, JSON.stringify(args)), }); await expectResult(fn, 42, { value: "[42]", syncErrback: true }); }); test("failure", async () => { const fn = gensync({ sync: throwTestError, ...
Code excerptlines 243-261, bytes 5484-6036 describe("'errback' sync handler", async () => { test("success", async () => { const fn = gensync({ sync: throwTestError, errback: (...args) => args.pop()(null, JSON.stringify(args)), }); await expectResult(fn, 42, { value: "[42]", syncErrback: true }); }); test("failure", async () => { const fn = gensync({ sync: throwTestError, ...test("success", async () => { const fn = gensync({ sync: throwTestError, errback: (...args) => args.pop()(null, JSON.stringify(args)), }); await expectResult(fn, 42, { value: "[42]", syncErrback: true }); });
Code excerptlines 244-251, bytes 5537-5783 describe("'errback' sync handler", async () => {\ntest("success", async () => { const fn = gensync({ sync: throwTestError, errback: (...args) => args.pop()(null, JSON.stringify(args)), }); await expectResult(fn, 42, { value: "[42]", syncErrback: true }); });test("failure", async () => { const fn = gensync({ sync: throwTestError, errback: (...args) => args.pop()(JSON.stringify(args)), }); await expectResult(fn, 42, { error: "[42]", syncErrback: true }); });
Code excerptlines 253-260, bytes 5790-6030 test("failure", async () => { const fn = gensync({ sync: throwTestError, errback: (...args) => args.pop()(JSON.stringify(args)), }); await expectResult(fn, 42, { error: "[42]", syncErrback: true }); });\n});describe("'errback' async handler", async () => { test("success", async () => { const fn = gensync({ sync: throwTestError, errback: (...args) => process.nextTick(() => args.pop()(null, JSON.stringify(args))), }); await expectResult(fn, 42, { value: "[42]" }); }); test("failure", async () => { const fn = gensync({ sync: throw...
Code excerptlines 263-283, bytes 6041-6624 describe("'errback' async handler", async () => { test("success", async () => { const fn = gensync({ sync: throwTestError, errback: (...args) => process.nextTick(() => args.pop()(null, JSON.stringify(args))), }); await expectResult(fn, 42, { value: "[42]" }); }); test("failure", async () => { const fn = gensync({ sync: throw...\n});test("success", async () => { const fn = gensync({ sync: throwTestError, errback: (...args) => process.nextTick(() => args.pop()(null, JSON.stringify(args))), }); await expectResult(fn, 42, { value: "[42]" }); });
Code excerptlines 264-272, bytes 6095-6356 describe("'errback' async handler", async () => {\ntest("success", async () => { const fn = gensync({ sync: throwTestError, errback: (...args) => process.nextTick(() => args.pop()(null, JSON.stringify(args))), }); await expectResult(fn, 42, { value: "[42]" }); });test("failure", async () => { const fn = gensync({ sync: throwTestError, errback: (...args) => process.nextTick(() => args.pop()(JSON.stringify(args))), }); await expectResult(fn, 42, { error: "[42]" }); });
Code excerptlines 274-282, bytes 6363-6618 test("failure", async () => { const fn = gensync({ sync: throwTestError, errback: (...args) => process.nextTick(() => args.pop()(JSON.stringify(args))), }); await expectResult(fn, 42, { error: "[42]" }); });\n});describe("gensync(function* () {})", () => { test("sync throw before body", async () => { const fn = gensync(function*(arg = throwTestError()) {}); await expectResult(fn, undefined, { error: TEST_ERROR, syncErrback: true, }); }); test("sync throw inside body", async () => { const fn = gensync(function*() { throwTestError(); }); await expectResult(...
Code excerptlines 286-409, bytes 6631-9290 describe("gensync(function* () {})", () => { test("sync throw before body", async () => { const fn = gensync(function*(arg = throwTestError()) {}); await expectResult(fn, undefined, { error: TEST_ERROR, syncErrback: true, }); }); test("sync throw inside body", async () => { const fn = gensync(function*() { throwTestError(); }); await expectResult(...test("sync throw before body", async () => { const fn = gensync(function*(arg = throwTestError()) {}); await expectResult(fn, undefined, { error: TEST_ERROR, syncErrback: true, }); });
Code excerptlines 287-294, bytes 6678-6888 describe("gensync(function* () {})", () => {\ntest("sync throw before body", async () => { const fn = gensync(function*(arg = throwTestError()) {}); await expectResult(fn, undefined, { error: TEST_ERROR, syncErrback: true, }); });test("sync throw inside body", async () => { const fn = gensync(function*() { throwTestError(); }); await expectResult(fn, undefined, { error: TEST_ERROR, syncErrback: true, }); });
Code excerptlines 296-305, bytes 6893-7110 test("sync throw inside body", async () => { const fn = gensync(function*() { throwTestError(); }); await expectResult(fn, undefined, { error: TEST_ERROR, syncErrback: true, }); });test("async throw inside body", async () => { const fn = gensync(function*() { const val = yield* doSuccess(); throwTestError(); }); await expectResult(fn, undefined, { error: TEST_ERROR, }); });
Code excerptlines 307-316, bytes 7115-7346 test("async throw inside body", async () => { const fn = gensync(function*() { const val = yield* doSuccess(); throwTestError(); }); await expectResult(fn, undefined, { error: TEST_ERROR, }); });test("error inside body", async () => { const fn = gensync(function*() { yield* doError(); }); await expectResult(fn, undefined, { error: DID_ERROR, expectSync: true, syncErrback: false, }); });
Code excerptlines 318-328, bytes 7351-7587 test("error inside body", async () => { const fn = gensync(function*() { yield* doError(); }); await expectResult(fn, undefined, { error: DID_ERROR, expectSync: true, syncErrback: false, }); });test("successful return value", async () => { const fn = gensync(function*() { const value = yield* doSuccess(); expect(value).toBe(42); return 84; }); await expectResult(fn, undefined, { value: 84, expectSync: true, syncErrback: false, }); });
Code excerptlines 330-344, bytes 7592-7892 test("successful return value", async () => { const fn = gensync(function*() { const value = yield* doSuccess(); expect(value).toBe(42); return 84; }); await expectResult(fn, undefined, { value: 84, expectSync: true, syncErrback: false, }); });test("successful final value", async () => { const fn = gensync(function*() { return 42; }); await expectResult(fn, undefined, { value: 42, expectSync: true, }); });
Code excerptlines 346-355, bytes 7897-8098 test("successful final value", async () => { const fn = gensync(function*() { return 42; }); await expectResult(fn, undefined, { value: 42, expectSync: true, }); });test("yield unexpected object", async () => { const fn = gensync(function*() { yield {}; }); try { await fn.async(); throwTestError(); } catch (err) { expect(err.message).toMatch( /Got unexpected yielded value in gensync generator/ ); expect(err.code).toBe("GENSYNC_EXPECTED_START"); } });
Code excerptlines 357-372, bytes 8103-8459 test("yield unexpected object", async () => { const fn = gensync(function*() { yield {}; }); try { await fn.async(); throwTestError(); } catch (err) { expect(err.message).toMatch( /Got unexpected yielded value in gensync generator/ ); expect(err.code).toBe("GENSYNC_EXPECTED_START"); } });test("yield suspend yield", async () => { const fn = gensync(function*() { yield Symbol.for("gensync:v1:start"); // Should be "yield*" for no error. yield {}; }); try { await fn.async(); throwTestError(); } catch (err) { expect(err.message).toMatch(/Expected GENSYNC_SUSPEND, got {}/); expect(err.code).toBe("GENSYNC_EXPECTED_SUSPEND"); ...
Code excerptlines 374-390, bytes 8464-8872 test("yield suspend yield", async () => { const fn = gensync(function*() { yield Symbol.for("gensync:v1:start"); // Should be "yield*" for no error. yield {}; }); try { await fn.async(); throwTestError(); } catch (err) { expect(err.message).toMatch(/Expected GENSYNC_SUSPEND, got {}/); expect(err.code).toBe("GENSYNC_EXPECTED_SUSPEND"); ...test("yield suspend return", async () => { const fn = gensync(function*() { yield Symbol.for("gensync:v1:start"); // Should be "yield*" for no error. return {}; }); try { await fn.async(); throwTestError(); } catch (err) { expect(err.message).toMatch(/Unexpected generator completion/); expect(err.code).toBe("GENSYNC_EXPECTED_SUSPEND");...
Code excerptlines 392-408, bytes 8877-9286 test("yield suspend return", async () => { const fn = gensync(function*() { yield Symbol.for("gensync:v1:start"); // Should be "yield*" for no error. return {}; }); try { await fn.async(); throwTestError(); } catch (err) { expect(err.message).toMatch(/Unexpected generator completion/); expect(err.code).toBe("GENSYNC_EXPECTED_SUSPEND");...\n});describe("gensync.all()", () => { test("success", async () => { const fn = gensync(function*() { const result = yield* gensync.all([doSuccess(), doSuccess()]); expect(result).toEqual([42, 42]); }); await expectResult(fn, undefined, { value: undefined, expectSync: true, syncErrback: false, }); }); test("error first", async () => { const fn ...
Code excerptlines 411-461, bytes 9293-10410 describe("gensync.all()", () => { test("success", async () => { const fn = gensync(function*() { const result = yield* gensync.all([doSuccess(), doSuccess()]); expect(result).toEqual([42, 42]); }); await expectResult(fn, undefined, { value: undefined, expectSync: true, syncErrback: false, }); }); test("error first", async () => { const fn ...test("success", async () => { const fn = gensync(function*() { const result = yield* gensync.all([doSuccess(), doSuccess()]); expect(result).toEqual([42, 42]); }); await expectResult(fn, undefined, { value: undefined, expectSync: true, syncErrback: false, }); });
Code excerptlines 412-424, bytes 9329-9641 describe("gensync.all()", () => {\ntest("success", async () => { const fn = gensync(function*() { const result = yield* gensync.all([doSuccess(), doSuccess()]); expect(result).toEqual([42, 42]); }); await expectResult(fn, undefined, { value: undefined, expectSync: true, syncErrback: false, }); });test("error first", async () => { const fn = gensync(function*() { yield* gensync.all([doError(), doSuccess()]); }); await expectResult(fn, undefined, { error: DID_ERROR, expectSync: true, syncErrback: false, }); });
Code excerptlines 426-436, bytes 9646-9904 test("error first", async () => { const fn = gensync(function*() { yield* gensync.all([doError(), doSuccess()]); }); await expectResult(fn, undefined, { error: DID_ERROR, expectSync: true, syncErrback: false, }); });test("error last", async () => { const fn = gensync(function*() { yield* gensync.all([doSuccess(), doError()]); }); await expectResult(fn, undefined, { error: DID_ERROR, expectSync: true, syncErrback: false, }); });
Code excerptlines 438-448, bytes 9909-10166 test("error last", async () => { const fn = gensync(function*() { yield* gensync.all([doSuccess(), doError()]); }); await expectResult(fn, undefined, { error: DID_ERROR, expectSync: true, syncErrback: false, }); });test("empty list", async () => { const fn = gensync(function*() { yield* gensync.all([]); }); await expectResult(fn, undefined, { value: undefined, expectSync: true, syncErrback: false, }); });
Code excerptlines 450-460, bytes 10171-10406 test("empty list", async () => { const fn = gensync(function*() { yield* gensync.all([]); }); await expectResult(fn, undefined, { value: undefined, expectSync: true, syncErrback: false, }); });\n});describe("gensync.race()", () => { test("success", async () => { const fn = gensync(function*() { const result = yield* gensync.race([doSuccess(), doError()]); expect(result).toEqual(42); }); await expectResult(fn, undefined, { value: undefined, expectSync: true, syncErrback: false, }); }); test("error", async () => { const fn = gensync(fu...
Code excerptlines 463-489, bytes 10413-11017 describe("gensync.race()", () => { test("success", async () => { const fn = gensync(function*() { const result = yield* gensync.race([doSuccess(), doError()]); expect(result).toEqual(42); }); await expectResult(fn, undefined, { value: undefined, expectSync: true, syncErrback: false, }); }); test("error", async () => { const fn = gensync(fu...test("success", async () => { const fn = gensync(function*() { const result = yield* gensync.race([doSuccess(), doError()]); expect(result).toEqual(42); }); await expectResult(fn, undefined, { value: undefined, expectSync: true, syncErrback: false, }); });
Code excerptlines 464-476, bytes 10450-10755 describe("gensync.race()", () => {\ntest("success", async () => { const fn = gensync(function*() { const result = yield* gensync.race([doSuccess(), doError()]); expect(result).toEqual(42); }); await expectResult(fn, undefined, { value: undefined, expectSync: true, syncErrback: false, }); });test("error", async () => { const fn = gensync(function*() { yield* gensync.race([doError(), doSuccess()]); }); await expectResult(fn, undefined, { error: DID_ERROR, expectSync: true, syncErrback: false, }); });
Code excerptlines 478-488, bytes 10760-11013 test("error", async () => { const fn = gensync(function*() { yield* gensync.race([doError(), doSuccess()]); }); await expectResult(fn, undefined, { error: DID_ERROR, expectSync: true, syncErrback: false, }); });\n});
describe('requires-port', function () { 'use strict'; var assume = require('assume') , required = require('./'); it('is exported as a function', function () { assume(required).is.a('function'); }); it('does not require empty ports', function () { assume(required('', 'http')).false(); assume(required('', 'wss')).false(); assume(required('', 'ws')).false(); assum...
Code excerptlines 1-98, bytes 0-3391 describe('requires-port', function () { 'use strict'; var assume = require('assume') , required = require('./'); it('is exported as a function', function () { assume(required).is.a('function'); }); it('does not require empty ports', function () { assume(required('', 'http')).false(); assume(required('', 'wss')).false(); assume(required('', 'ws')).false(); assum...it('is exported as a function', function () { assume(required).is.a('function'); });
Code excerptlines 7-9, bytes 125-214 it('is exported as a function', function () { assume(required).is.a('function'); });it('does not require empty ports', function () { assume(required('', 'http')).false(); assume(required('', 'wss')).false(); assume(required('', 'ws')).false(); assume(required('', 'cowsack')).false(); });
Code excerptlines 11-16, bytes 219-440 it('does not require empty ports', function () { assume(required('', 'http')).false(); assume(required('', 'wss')).false(); assume(required('', 'ws')).false(); assume(required('', 'cowsack')).false(); });it('assumes true for unknown protocols',function () { assume(required('808', 'foo')).true(); assume(required('80', 'bar')).true(); });
Code excerptlines 18-21, bytes 445-588 it('assumes true for unknown protocols',function () { assume(required('808', 'foo')).true(); assume(required('80', 'bar')).true(); });it('never requires port numbers for file', function () { assume(required(8080, 'file')).false(); });
Code excerptlines 23-25, bytes 593-698 it('never requires port numbers for file', function () { assume(required(8080, 'file')).false(); });it('does not require port 80 for http', function () { assume(required('80', 'http')).false(); assume(required(80, 'http')).false(); assume(required(80, 'http://')).false(); assume(required(80, 'http://www.google.com')).false(); assume(required('8080', 'http')).true(); assume(required(8080, 'http')).true(); assume(required(8080, 'http://')).true(); assume(required...
Code excerptlines 27-37, bytes 703-1146 it('does not require port 80 for http', function () { assume(required('80', 'http')).false(); assume(required(80, 'http')).false(); assume(required(80, 'http://')).false(); assume(required(80, 'http://www.google.com')).false(); assume(required('8080', 'http')).true(); assume(required(8080, 'http')).true(); assume(required(8080, 'http://')).true(); assume(required...it('does not require port 80 for ws', function () { assume(required('80', 'ws')).false(); assume(required(80, 'ws')).false(); assume(required(80, 'ws://')).false(); assume(required(80, 'ws://www.google.com')).false(); assume(required('8080', 'ws')).true(); assume(required(8080, 'ws')).true(); assume(required(8080, 'ws://')).true(); assume(required(8080, 'ws://www...
Code excerptlines 39-49, bytes 1151-1576 it('does not require port 80 for ws', function () { assume(required('80', 'ws')).false(); assume(required(80, 'ws')).false(); assume(required(80, 'ws://')).false(); assume(required(80, 'ws://www.google.com')).false(); assume(required('8080', 'ws')).true(); assume(required(8080, 'ws')).true(); assume(required(8080, 'ws://')).true(); assume(required(8080, 'ws://www...it('does not require port 443 for https', function () { assume(required('443', 'https')).false(); assume(required(443, 'https')).false(); assume(required(443, 'https://')).false(); assume(required(443, 'https://www.google.com')).false(); assume(required('8080', 'https')).true(); assume(required(8080, 'https')).true(); assume(required(8080, 'https://')).true(); as...
Code excerptlines 51-61, bytes 1581-2038 it('does not require port 443 for https', function () { assume(required('443', 'https')).false(); assume(required(443, 'https')).false(); assume(required(443, 'https://')).false(); assume(required(443, 'https://www.google.com')).false(); assume(required('8080', 'https')).true(); assume(required(8080, 'https')).true(); assume(required(8080, 'https://')).true(); as...it('does not require port 443 for wss', function () { assume(required('443', 'wss')).false(); assume(required(443, 'wss')).false(); assume(required(443, 'wss://')).false(); assume(required(443, 'wss://www.google.com')).false(); assume(required('8080', 'wss')).true(); assume(required(8080, 'wss')).true(); assume(required(8080, 'wss://')).true(); assume(required(80...
Code excerptlines 63-73, bytes 2043-2482 it('does not require port 443 for wss', function () { assume(required('443', 'wss')).false(); assume(required(443, 'wss')).false(); assume(required(443, 'wss://')).false(); assume(required(443, 'wss://www.google.com')).false(); assume(required('8080', 'wss')).true(); assume(required(8080, 'wss')).true(); assume(required(8080, 'wss://')).true(); assume(required(80...it('does not require port 21 for ftp', function () { assume(required('21', 'ftp')).false(); assume(required(21, 'ftp')).false(); assume(required(21, 'ftp://')).false(); assume(required(21, 'ftp://www.google.com')).false(); assume(required('8080', 'ftp')).true(); assume(required(8080, 'ftp')).true(); assume(required(8080, 'ftp://')).true(); assume(required(8080, '...
Code excerptlines 75-85, bytes 2487-2921 it('does not require port 21 for ftp', function () { assume(required('21', 'ftp')).false(); assume(required(21, 'ftp')).false(); assume(required(21, 'ftp://')).false(); assume(required(21, 'ftp://www.google.com')).false(); assume(required('8080', 'ftp')).true(); assume(required(8080, 'ftp')).true(); assume(required(8080, 'ftp://')).true(); assume(required(8080, '...it('does not require port 70 for gopher', function () { assume(required('70', 'gopher')).false(); assume(required(70, 'gopher')).false(); assume(required(70, 'gopher://')).false(); assume(required(70, 'gopher://www.google.com')).false(); assume(required('8080', 'gopher')).true(); assume(required(8080, 'gopher')).true(); assume(required(8080, 'gopher://')).true(); ...
Code excerptlines 87-97, bytes 2926-3387 it('does not require port 70 for gopher', function () { assume(required('70', 'gopher')).false(); assume(required(70, 'gopher')).false(); assume(required(70, 'gopher://')).false(); assume(required(70, 'gopher://www.google.com')).false(); assume(required('8080', 'gopher')).true(); assume(required(8080, 'gopher')).true(); assume(required(8080, 'gopher://')).true(); ...\n});
describe("sprintfjs", function() { var pi = 3.141592653589793 it("should return formated strings for simple placeholders", function() { assert.equal("%", sprintf("%%")) assert.equal("10", sprintf("%b", 2)) assert.equal("A", sprintf("%c", 65)) assert.equal("2", sprintf("%d", 2)) assert.equal("2", sprintf("%i", 2)) assert.equal("2", sprintf("%...
Code excerptlines 6-82, bytes 146-3745 describe("sprintfjs", function() { var pi = 3.141592653589793 it("should return formated strings for simple placeholders", function() { assert.equal("%", sprintf("%%")) assert.equal("10", sprintf("%b", 2)) assert.equal("A", sprintf("%c", 65)) assert.equal("2", sprintf("%d", 2)) assert.equal("2", sprintf("%i", 2)) assert.equal("2", sprintf("%...it("should return formated strings for simple placeholders", function() { assert.equal("%", sprintf("%%")) assert.equal("10", sprintf("%b", 2)) assert.equal("A", sprintf("%c", 65)) assert.equal("2", sprintf("%d", 2)) assert.equal("2", sprintf("%i", 2)) assert.equal("2", sprintf("%d", "2")) assert.equal("2", sprintf("%i", "2")) ass...
Code excerptlines 9-30, bytes 217-1371 it("should return formated strings for simple placeholders", function() { assert.equal("%", sprintf("%%")) assert.equal("10", sprintf("%b", 2)) assert.equal("A", sprintf("%c", 65)) assert.equal("2", sprintf("%d", 2)) assert.equal("2", sprintf("%i", 2)) assert.equal("2", sprintf("%d", "2")) assert.equal("2", sprintf("%i", "2")) ass...it("should return formated strings for complex placeholders", function() { // sign assert.equal("2", sprintf("%d", 2)) assert.equal("-2", sprintf("%d", -2)) assert.equal("+2", sprintf("%+d", 2)) assert.equal("-2", sprintf("%+d", -2)) assert.equal("2", sprintf("%i", 2)) assert.equal("-2", sprintf("%i", -2)) assert.equal("+2", sprin...
Code excerptlines 32-76, bytes 1377-3512 it("should return formated strings for complex placeholders", function() { // sign assert.equal("2", sprintf("%d", 2)) assert.equal("-2", sprintf("%d", -2)) assert.equal("+2", sprintf("%+d", 2)) assert.equal("-2", sprintf("%+d", -2)) assert.equal("2", sprintf("%i", 2)) assert.equal("-2", sprintf("%i", -2)) assert.equal("+2", sprin...it("should return formated strings for callbacks", function() { assert.equal("foobar", sprintf("%s", function() { return "foobar" })) assert.equal(Date.now(), sprintf("%s", Date.now)) // should pass... })
Code excerptlines 78-81, bytes 3518-3742 it("should return formated strings for callbacks", function() { assert.equal("foobar", sprintf("%s", function() { return "foobar" })) assert.equal(Date.now(), sprintf("%s", Date.now)) // should pass... })\n})
describe('popup parse integration', () => { let messageListener; beforeAll(() => { // the element ids popup.js caches at load (mirrors popup.html) document.body.innerHTML = ` <div id="flowTitle"></div> <div id="flowMeta"></div> <div id="defaultExplainer"></div> <div id="errorBar"><span id="error"></span></div> <div id="lintResults"></div> <button id...
Code excerptlines 5-191, bytes 238-8089 describe('popup parse integration', () => { let messageListener; beforeAll(() => { // the element ids popup.js caches at load (mirrors popup.html) document.body.innerHTML = ` <div id="flowTitle"></div> <div id="flowMeta"></div> <div id="defaultExplainer"></div> <div id="errorBar"><span id="error"></span></div> <div id="lintResults"></div> <button id...beforeAll(() => { // the element ids popup.js caches at load (mirrors popup.html) document.body.innerHTML = ` <div id="flowTitle"></div> <div id="flowMeta"></div> <div id="defaultExplainer"></div> <div id="errorBar"><span id="error"></span></div> <div id="lintResults"></div> <button id="aiSettingsToggle"></button> <section id="aiSettingsPanel" cl...
Code excerptlines 8-70, bytes 308-2587 beforeAll(() => { // the element ids popup.js caches at load (mirrors popup.html) document.body.innerHTML = ` <div id="flowTitle"></div> <div id="flowMeta"></div> <div id="defaultExplainer"></div> <div id="errorBar"><span id="error"></span></div> <div id="lintResults"></div> <button id="aiSettingsToggle"></button> <section id="aiSettingsPanel" cl...test('should render explanation, lint results and table from a definition', async () => { expect(messageListener).toBeDefined(); const flowDefinition = { label: 'Test Flow', description: '', processType: 'AutoLaunchedFlow', processMetadataValues: [ { name: 'BuilderType', value: { stringValue: 'LightningFlowBuilder' } }, { name: 'CanvasMode', value...
Code excerptlines 72-167, bytes 2592-7136 test('should render explanation, lint results and table from a definition', async () => { expect(messageListener).toBeDefined(); const flowDefinition = { label: 'Test Flow', description: '', processType: 'AutoLaunchedFlow', processMetadataValues: [ { name: 'BuilderType', value: { stringValue: 'LightningFlowBuilder' } }, { name: 'CanvasMode', value...test('should re-render without enrichment data and drop the stats line', async () => { const flowDefinition = { label: 'Bare Flow', description: 'documented', processType: 'Flow', processMetadataValues: [ { name: 'BuilderType', value: { stringValue: 'LightningFlowBuilder' } }, { name: 'CanvasMode', value: { stringValue: 'AUTO_LAYOUT_CANVAS' } } ]...
Code excerptlines 169-190, bytes 7141-8085 test('should re-render without enrichment data and drop the stats line', async () => { const flowDefinition = { label: 'Bare Flow', description: 'documented', processType: 'Flow', processMetadataValues: [ { name: 'BuilderType', value: { stringValue: 'LightningFlowBuilder' } }, { name: 'CanvasMode', value: { stringValue: 'AUTO_LAYOUT_CANVAS' } } ]...\n});
describe('Response Parsing Logic', () => { // Helper function to simulate GPT-5 response parsing function parseGPT5Response(apiResponse) { if (apiResponse === null || apiResponse === undefined) { throw new Error('Response cannot be null or undefined'); } try { const parsedResponse = JSON.parse(apiResponse); if (parsedResponse.error) { return `$...
Code excerptlines 3-295, bytes 41-9052 describe('Response Parsing Logic', () => { // Helper function to simulate GPT-5 response parsing function parseGPT5Response(apiResponse) { if (apiResponse === null || apiResponse === undefined) { throw new Error('Response cannot be null or undefined'); } try { const parsedResponse = JSON.parse(apiResponse); if (parsedResponse.error) { return `$...describe('GPT-5 Response Parsing', () => { test('should parse successful GPT-5 response', () => { const mockResponse = JSON.stringify({ output: { content: { text: 'This is a sample response from GPT-5' } }, status: 'complete' }); const result = parseGPT5Response(mockResponse); expect(result).toBe('This is a samp...
Code excerptlines 61-138, bytes 2006-4325 describe('GPT-5 Response Parsing', () => { test('should parse successful GPT-5 response', () => { const mockResponse = JSON.stringify({ output: { content: { text: 'This is a sample response from GPT-5' } }, status: 'complete' }); const result = parseGPT5Response(mockResponse); expect(result).toBe('This is a samp...test('should parse successful GPT-5 response', () => { const mockResponse = JSON.stringify({ output: { content: { text: 'This is a sample response from GPT-5' } }, status: 'complete' }); const result = parseGPT5Response(mockResponse); expect(result).toBe('This is a sample response from GPT-5'); });
Code excerptlines 62-74, bytes 2053-2436 describe('GPT-5 Response Parsing', () => {\ntest('should parse successful GPT-5 response', () => { const mockResponse = JSON.stringify({ output: { content: { text: 'This is a sample response from GPT-5' } }, status: 'complete' }); const result = parseGPT5Response(mockResponse); expect(result).toBe('This is a sample response from GPT-5'); });test('should handle GPT-5 response truncated due to max tokens', () => { const mockResponse = JSON.stringify({ output: { content: { text: 'This is a truncated response' } }, status: 'incomplete', incomplete_details: { reason: 'max_tokens' } }); const result = parseGPT5Response(mockResponse); ...
Code excerptlines 76-91, bytes 2443-2936 test('should handle GPT-5 response truncated due to max tokens', () => { const mockResponse = JSON.stringify({ output: { content: { text: 'This is a truncated response' } }, status: 'incomplete', incomplete_details: { reason: 'max_tokens' } }); const result = parseGPT5Response(mockResponse); ...test('should handle GPT-5 response with incomplete status but different reason', () => { const mockResponse = JSON.stringify({ output: { content: { text: 'Response stopped for other reason' } }, status: 'incomplete', incomplete_details: { reason: 'stop_sequence' } }); const result = parseGPT5Re...
Code excerptlines 93-108, bytes 2943-3431 test('should handle GPT-5 response with incomplete status but different reason', () => { const mockResponse = JSON.stringify({ output: { content: { text: 'Response stopped for other reason' } }, status: 'incomplete', incomplete_details: { reason: 'stop_sequence' } }); const result = parseGPT5Re...test('should handle GPT-5 response without content', () => { const mockResponse = JSON.stringify({ output: {}, status: 'complete' }); const result = parseGPT5Response(mockResponse); expect(result).toBe('No response content received from GPT-5 model'); });
Code excerptlines 110-118, bytes 3438-3737 test('should handle GPT-5 response without content', () => { const mockResponse = JSON.stringify({ output: {}, status: 'complete' }); const result = parseGPT5Response(mockResponse); expect(result).toBe('No response content received from GPT-5 model'); });test('should handle GPT-5 API error response', () => { const mockResponse = JSON.stringify({ error: { message: 'Invalid API key', type: 'authentication_error' } }); const result = parseGPT5Response(mockResponse); expect(result).toBe('Invalid API key (authentication_error)'); });
Code excerptlines 120-130, bytes 3744-4087 test('should handle GPT-5 API error response', () => { const mockResponse = JSON.stringify({ error: { message: 'Invalid API key', type: 'authentication_error' } }); const result = parseGPT5Response(mockResponse); expect(result).toBe('Invalid API key (authentication_error)'); });test('should handle malformed GPT-5 JSON response', () => { const mockResponse = 'invalid json {'; const result = parseGPT5Response(mockResponse); expect(result).toMatch(/Failed to parse response:/); });
Code excerptlines 132-137, bytes 4094-4319 test('should handle malformed GPT-5 JSON response', () => { const mockResponse = 'invalid json {'; const result = parseGPT5Response(mockResponse); expect(result).toMatch(/Failed to parse response:/); });\n});describe('Standard Response Parsing', () => { test('should parse successful standard response', () => { const mockResponse = JSON.stringify({ choices: [{ message: { content: 'This is a sample response from GPT-4' }, finish_reason: 'stop' }] }); const result = parseStandardResponse(mockResponse); expect(result)...
Code excerptlines 140-196, bytes 4330-6114 describe('Standard Response Parsing', () => { test('should parse successful standard response', () => { const mockResponse = JSON.stringify({ choices: [{ message: { content: 'This is a sample response from GPT-4' }, finish_reason: 'stop' }] }); const result = parseStandardResponse(mockResponse); expect(result)...test('should parse successful standard response', () => { const mockResponse = JSON.stringify({ choices: [{ message: { content: 'This is a sample response from GPT-4' }, finish_reason: 'stop' }] }); const result = parseStandardResponse(mockResponse); expect(result).toBe('This is a sample response from GPT-4'); ...
Code excerptlines 141-153, bytes 4380-4781 describe('Standard Response Parsing', () => {\ntest('should parse successful standard response', () => { const mockResponse = JSON.stringify({ choices: [{ message: { content: 'This is a sample response from GPT-4' }, finish_reason: 'stop' }] }); const result = parseStandardResponse(mockResponse); expect(result).toBe('This is a sample response from GPT-4'); ...test('should handle standard response truncated due to length', () => { const mockResponse = JSON.stringify({ choices: [{ message: { content: 'This is a truncated response' }, finish_reason: 'length' }] }); const result = parseStandardResponse(mockResponse); expect(result).toBe('This is a truncated response (RES...
Code excerptlines 155-167, bytes 4788-5223 test('should handle standard response truncated due to length', () => { const mockResponse = JSON.stringify({ choices: [{ message: { content: 'This is a truncated response' }, finish_reason: 'length' }] }); const result = parseStandardResponse(mockResponse); expect(result).toBe('This is a truncated response (RES...test('should handle standard API error response', () => { const mockResponse = JSON.stringify({ error: { message: 'Rate limit exceeded', type: 'rate_limit_error' } }); const result = parseStandardResponse(mockResponse); expect(result).toBe('Rate limit exceeded (rate_limit_error)'); });
Code excerptlines 169-179, bytes 5230-5580 test('should handle standard API error response', () => { const mockResponse = JSON.stringify({ error: { message: 'Rate limit exceeded', type: 'rate_limit_error' } }); const result = parseStandardResponse(mockResponse); expect(result).toBe('Rate limit exceeded (rate_limit_error)'); });test('should handle malformed standard JSON response', () => { const mockResponse = 'invalid json {'; const result = parseStandardResponse(mockResponse); expect(result).toMatch(/Failed to parse response:/); });
Code excerptlines 181-186, bytes 5587-5819 test('should handle malformed standard JSON response', () => { const mockResponse = 'invalid json {'; const result = parseStandardResponse(mockResponse); expect(result).toMatch(/Failed to parse response:/); });test('should handle missing choices in standard response', () => { const mockResponse = JSON.stringify({ usage: { total_tokens: 100 } }); const result = parseStandardResponse(mockResponse); expect(result).toMatch(/Failed to parse response:/); });
Code excerptlines 188-195, bytes 5826-6108 test('should handle missing choices in standard response', () => { const mockResponse = JSON.stringify({ usage: { total_tokens: 100 } }); const result = parseStandardResponse(mockResponse); expect(result).toMatch(/Failed to parse response:/); });\n});describe('Common Error Cases', () => { const commonErrorCases = [ { name: 'authentication error', response: { error: { message: 'Incorrect API key provided', type: 'invalid_request_error' } }, expected: 'Incorrect API key provided (invalid_request_error)' }, { name: 'rate limit error', ...
Code excerptlines 198-243, bytes 6119-7472 describe('Common Error Cases', () => { const commonErrorCases = [ { name: 'authentication error', response: { error: { message: 'Incorrect API key provided', type: 'invalid_request_error' } }, expected: 'Incorrect API key provided (invalid_request_error)' }, { name: 'rate limit error', ...test(`should handle ${testCase.name} for GPT-5`, () => { const result = parseGPT5Response(JSON.stringify(testCase.response)); expect(result).toBe(testCase.expected); });
Code excerptlines 233-236, bytes 7055-7245 commonErrorCases.forEach(testCase => {\ntest(`should handle ${testCase.name} for GPT-5`, () => { const result = parseGPT5Response(JSON.stringify(testCase.response)); expect(result).toBe(testCase.expected); });test(`should handle ${testCase.name} for standard models`, () => { const result = parseStandardResponse(JSON.stringify(testCase.response)); expect(result).toBe(testCase.expected); });
Code excerptlines 238-241, bytes 7254-7458 test(`should handle ${testCase.name} for standard models`, () => { const result = parseStandardResponse(JSON.stringify(testCase.response)); expect(result).toBe(testCase.expected); });\n});describe('Edge Cases', () => { test('should handle empty response string', () => { expect(parseGPT5Response('')).toMatch(/Failed to parse response:/); expect(parseStandardResponse('')).toMatch(/Failed to parse response:/); }); test('should handle null response', () => { expect(() => parseGPT5Response(null)).toThrow(); expect(() => parseStandardResponse(null))...
Code excerptlines 245-294, bytes 7477-9048 describe('Edge Cases', () => { test('should handle empty response string', () => { expect(parseGPT5Response('')).toMatch(/Failed to parse response:/); expect(parseStandardResponse('')).toMatch(/Failed to parse response:/); }); test('should handle null response', () => { expect(() => parseGPT5Response(null)).toThrow(); expect(() => parseStandardResponse(null))...\n});test('should handle empty response string', () => { expect(parseGPT5Response('')).toMatch(/Failed to parse response:/); expect(parseStandardResponse('')).toMatch(/Failed to parse response:/); });
Code excerptlines 246-249, bytes 7512-7722 describe('Edge Cases', () => {\ntest('should handle empty response string', () => { expect(parseGPT5Response('')).toMatch(/Failed to parse response:/); expect(parseStandardResponse('')).toMatch(/Failed to parse response:/); });test('should handle null response', () => { expect(() => parseGPT5Response(null)).toThrow(); expect(() => parseStandardResponse(null)).toThrow(); });
Code excerptlines 251-254, bytes 7729-7893 test('should handle null response', () => { expect(() => parseGPT5Response(null)).toThrow(); expect(() => parseStandardResponse(null)).toThrow(); });test('should handle response with null content', () => { const gpt5Response = JSON.stringify({ output: { content: { text: null } }, status: 'complete' }); const standardResponse = JSON.stringify({ choices: [{ message: { content: null }, finish_reason: 'stop' }] ...
Code excerptlines 256-278, bytes 7900-8535 test('should handle response with null content', () => { const gpt5Response = JSON.stringify({ output: { content: { text: null } }, status: 'complete' }); const standardResponse = JSON.stringify({ choices: [{ message: { content: null }, finish_reason: 'stop' }] ...test('should handle deeply nested missing properties', () => { const gpt5ResponseMissingText = JSON.stringify({ output: { content: {} } }); const gpt5ResponseMissingContent = JSON.stringify({ output: {} }); expect(parseGPT5Response(gpt5ResponseMissingText)).toBe('No response content received from GPT-5 model'); expect(pars...
Code excerptlines 280-293, bytes 8542-9042 test('should handle deeply nested missing properties', () => { const gpt5ResponseMissingText = JSON.stringify({ output: { content: {} } }); const gpt5ResponseMissingContent = JSON.stringify({ output: {} }); expect(parseGPT5Response(gpt5ResponseMissingText)).toBe('No response content received from GPT-5 model'); expect(pars...\n});
describe('sendToGPT Function', () => { // Helper function to simulate the hash function function verySimpleHash(data) { let hash = 0; for (let i = 0, len = data.length; i < len; i++) { let chr = data.charCodeAt(i); hash = (hash << 5) - hash + chr; hash |= 0; } return hash; } // Constants const CACHE_DURATION = 300000; // 5 min // Mock DOM elements ...
Code excerptlines 3-716, bytes 37-23477 describe('sendToGPT Function', () => { // Helper function to simulate the hash function function verySimpleHash(data) { let hash = 0; for (let i = 0, len = data.length; i < len; i++) { let chr = data.charCodeAt(i); hash = (hash << 5) - hash + chr; hash |= 0; } return hash; } // Constants const CACHE_DURATION = 300000; // 5 min // Mock DOM elements ...beforeEach(() => { // Reset mocks jest.clearAllMocks(); sessionStorage.clear(); // Mock DOM elements mockSpinner = { style: { display: 'block' } }; mockResponseSpan = { innerText: '', innerHTML: '' }; document.getElementById = jest.fn((id) => { if (id === 'spinner') return mockSpinner; if (id === 'response') return mockResponseSpan; return ...
Code excerptlines 22-52, bytes 492-1327 beforeEach(() => { // Reset mocks jest.clearAllMocks(); sessionStorage.clear(); // Mock DOM elements mockSpinner = { style: { display: 'block' } }; mockResponseSpan = { innerText: '', innerHTML: '' }; document.getElementById = jest.fn((id) => { if (id === 'spinner') return mockSpinner; if (id === 'response') return mockResponseSpan; return ...jest.clearAllMocks()
Code excerptline 24, bytes 534-554 \njest.clearAllMocks()\n;document.getElementById = jest.fn((id) => { if (id === 'spinner') return mockSpinner; if (id === 'response') return mockResponseSpan; return null; });
Code excerptlines 31-35, bytes 757-902 \ndocument.getElementById = jest.fn((id) => { if (id === 'spinner') return mockSpinner; if (id === 'response') return mockResponseSpan; return null; });mockFetch = jest.fn(() => Promise.resolve({ ok: true, status: 200, text: () => Promise.resolve('{"choices":[{"message":{"content":"Test response"},"finish_reason":"stop"}]}'), }) );
Code excerptlines 38-44, bytes 939-1147 // Mock fetch\nmockFetch = jest.fn(() => Promise.resolve({ ok: true, status: 200, text: () => Promise.resolve('{"choices":[{"message":{"content":"Test response"},"finish_reason":"stop"}]}'), }) );\nglobal.fetch = mockFetch;jest.fn()
Code excerptline 48, bytes 1222-1231 console.log =\njest.fn()\n;jest.fn(() => 1000000)
Code excerptline 51, bytes 1299-1321 Date.now =\njest.fn(() => 1000000)\n;describe('Input Validation', () => { test('should handle null dataObject', () => { sendToGPT(null, 'test-key'); expect(mockResponseSpan.innerText).toBe('No data received from current page.'); expect(mockSpinner.style.display).toBe('none'); }); test('should handle undefined dataObject', () => { sendToGPT(undefined, 'test-key'); expect(mockR...
Code excerptlines 228-269, bytes 7507-8811 describe('Input Validation', () => { test('should handle null dataObject', () => { sendToGPT(null, 'test-key'); expect(mockResponseSpan.innerText).toBe('No data received from current page.'); expect(mockSpinner.style.display).toBe('none'); }); test('should handle undefined dataObject', () => { sendToGPT(undefined, 'test-key'); expect(mockR...test('should handle null dataObject', () => { sendToGPT(null, 'test-key'); expect(mockResponseSpan.innerText).toBe('No data received from current page.'); expect(mockSpinner.style.display).toBe('none'); });
Code excerptlines 229-234, bytes 7548-7782 describe('Input Validation', () => {\ntest('should handle null dataObject', () => { sendToGPT(null, 'test-key'); expect(mockResponseSpan.innerText).toBe('No data received from current page.'); expect(mockSpinner.style.display).toBe('none'); });test('should handle undefined dataObject', () => { sendToGPT(undefined, 'test-key'); expect(mockResponseSpan.innerText).toBe('No data received from current page.'); expect(mockSpinner.style.display).toBe('none'); });
Code excerptlines 236-241, bytes 7789-8033 test('should handle undefined dataObject', () => { sendToGPT(undefined, 'test-key'); expect(mockResponseSpan.innerText).toBe('No data received from current page.'); expect(mockSpinner.style.display).toBe('none'); });test('should handle missing resultData', () => { const dataObject = { currentURL: 'https://example.com', prompt: 'Test prompt', gptModel: 'gpt-4o' }; sendToGPT(dataObject, 'test-key'); expect(mockResponseSpan.innerText).toBe('No data to send.'); expect(mockSpinner.style.display).toBe('none'); });
Code excerptlines 243-254, bytes 8040-8408 test('should handle missing resultData', () => { const dataObject = { currentURL: 'https://example.com', prompt: 'Test prompt', gptModel: 'gpt-4o' }; sendToGPT(dataObject, 'test-key'); expect(mockResponseSpan.innerText).toBe('No data to send.'); expect(mockSpinner.style.display).toBe('none'); });test('should handle empty resultData', () => { const dataObject = { currentURL: 'https://example.com', resultData: '', prompt: 'Test prompt', gptModel: 'gpt-4o' }; sendToGPT(dataObject, 'test-key'); expect(mockResponseSpan.innerText).toBe('No data to send.'); expect(mockSpinner.style.display).toBe('none'); });
Code excerptlines 256-268, bytes 8415-8805 test('should handle empty resultData', () => { const dataObject = { currentURL: 'https://example.com', resultData: '', prompt: 'Test prompt', gptModel: 'gpt-4o' }; sendToGPT(dataObject, 'test-key'); expect(mockResponseSpan.innerText).toBe('No data to send.'); expect(mockSpinner.style.display).toBe('none'); });\n});describe('Cache Functionality', () => { test('should return cached response when available and fresh', () => { const dataObject = { currentURL: 'https://example.com', resultData: 'Test flow data', prompt: 'Explain this flow', gptModel: 'gpt-4o' }; // Set up cache const cacheKey = verySimpleHash('https://example.comExplain this flowTest...
Code excerptlines 271-368, bytes 8816-12235 describe('Cache Functionality', () => { test('should return cached response when available and fresh', () => { const dataObject = { currentURL: 'https://example.com', resultData: 'Test flow data', prompt: 'Explain this flow', gptModel: 'gpt-4o' }; // Set up cache const cacheKey = verySimpleHash('https://example.comExplain this flowTest...test('should return cached response when available and fresh', () => { const dataObject = { currentURL: 'https://example.com', resultData: 'Test flow data', prompt: 'Explain this flow', gptModel: 'gpt-4o' }; // Set up cache const cacheKey = verySimpleHash('https://example.comExplain this flowTest flow data'); const cachedData = { ...
Code excerptlines 272-293, bytes 8860-9689 describe('Cache Functionality', () => {\ntest('should return cached response when available and fresh', () => { const dataObject = { currentURL: 'https://example.com', resultData: 'Test flow data', prompt: 'Explain this flow', gptModel: 'gpt-4o' }; // Set up cache const cacheKey = verySimpleHash('https://example.comExplain this flowTest flow data'); const cachedData = { ...test('should not use expired cache', () => { const dataObject = { currentURL: 'https://example.com', resultData: 'Test flow data', prompt: 'Explain this flow', gptModel: 'gpt-4o' }; // Set up expired cache const cacheKey = verySimpleHash('https://example.comExplain this flowTest flow data'); const cachedData = { cachedDate:...
Code excerptlines 295-315, bytes 9696-10429 test('should not use expired cache', () => { const dataObject = { currentURL: 'https://example.com', resultData: 'Test flow data', prompt: 'Explain this flow', gptModel: 'gpt-4o' }; // Set up expired cache const cacheKey = verySimpleHash('https://example.comExplain this flowTest flow data'); const cachedData = { cachedDate:...test('should store response under the same key used for lookup', async () => { const dataObject = { currentURL: 'https://example.com', resultData: 'Test flow data', prompt: 'Explain this flow', gptModel: 'gpt-4o' }; // first call fetches from the API and stores the response sendToGPT(dataObject, 'test-key'); await new Promise(resol...
Code excerptlines 317-339, bytes 10436-11385 test('should store response under the same key used for lookup', async () => { const dataObject = { currentURL: 'https://example.com', resultData: 'Test flow data', prompt: 'Explain this flow', gptModel: 'gpt-4o' }; // first call fetches from the API and stores the response sendToGPT(dataObject, 'test-key'); await new Promise(resol...test('should clean up expired cache entries', () => { // Set up multiple cache entries const expiredKey = 'expired-entry'; const validKey = 'valid-entry'; sessionStorage.setItem(expiredKey, JSON.stringify({ cachedDate: Date.now() - (CACHE_DURATION + 10000), parsedResponse: 'Expired' })); sessionStorage.setItem(validKey, JSON.str...
Code excerptlines 341-367, bytes 11392-12229 test('should clean up expired cache entries', () => { // Set up multiple cache entries const expiredKey = 'expired-entry'; const validKey = 'valid-entry'; sessionStorage.setItem(expiredKey, JSON.stringify({ cachedDate: Date.now() - (CACHE_DURATION + 10000), parsedResponse: 'Expired' })); sessionStorage.setItem(validKey, JSON.str...\n});describe('Model Selection and Upgrade Logic', () => { test('should use default model when gptModel is not provided', () => { const dataObject = { currentURL: 'https://example.com', resultData: 'Short data', prompt: 'Test prompt' }; sendToGPT(dataObject, 'test-key'); expect(mockResponseSpan.innerText).toBe('Using gpt-5-nano...'); }); ...
Code excerptlines 370-438, bytes 12240-14422 describe('Model Selection and Upgrade Logic', () => { test('should use default model when gptModel is not provided', () => { const dataObject = { currentURL: 'https://example.com', resultData: 'Short data', prompt: 'Test prompt' }; sendToGPT(dataObject, 'test-key'); expect(mockResponseSpan.innerText).toBe('Using gpt-5-nano...'); }); ...test('should use default model when gptModel is not provided', () => { const dataObject = { currentURL: 'https://example.com', resultData: 'Short data', prompt: 'Test prompt' }; sendToGPT(dataObject, 'test-key'); expect(mockResponseSpan.innerText).toBe('Using gpt-5-nano...'); });
Code excerptlines 371-381, bytes 12298-12631 describe('Model Selection and Upgrade Logic', () => {\ntest('should use default model when gptModel is not provided', () => { const dataObject = { currentURL: 'https://example.com', resultData: 'Short data', prompt: 'Test prompt' }; sendToGPT(dataObject, 'test-key'); expect(mockResponseSpan.innerText).toBe('Using gpt-5-nano...'); });test('should use provided model', () => { const dataObject = { currentURL: 'https://example.com', resultData: 'Short data', prompt: 'Test prompt', gptModel: 'gpt-4o' }; sendToGPT(dataObject, 'test-key'); expect(mockResponseSpan.innerText).toBe('Using gpt-4o...'); });
Code excerptlines 383-394, bytes 12638-12966 test('should use provided model', () => { const dataObject = { currentURL: 'https://example.com', resultData: 'Short data', prompt: 'Test prompt', gptModel: 'gpt-4o' }; sendToGPT(dataObject, 'test-key'); expect(mockResponseSpan.innerText).toBe('Using gpt-4o...'); });test('should upgrade gpt-5-nano to gpt-4o for large data', () => { const largeData = 'x'.repeat(20000); // > 16200 chars const dataObject = { currentURL: 'https://example.com', resultData: largeData, prompt: 'Test prompt', gptModel: 'gpt-5-nano' }; sendToGPT(dataObject, 'test-key'); expect(mockResponseSpan.innerText).toBe('Using g...
Code excerptlines 396-409, bytes 12973-13568 test('should upgrade gpt-5-nano to gpt-4o for large data', () => { const largeData = 'x'.repeat(20000); // > 16200 chars const dataObject = { currentURL: 'https://example.com', resultData: largeData, prompt: 'Test prompt', gptModel: 'gpt-5-nano' }; sendToGPT(dataObject, 'test-key'); expect(mockResponseSpan.innerText).toBe('Using g...test('should not upgrade gpt-4o for large data', () => { const largeData = 'x'.repeat(20000); // > 16200 chars const dataObject = { currentURL: 'https://example.com', resultData: largeData, prompt: 'Test prompt', gptModel: 'gpt-4o' }; sendToGPT(dataObject, 'test-key'); expect(mockResponseSpan.innerText).toBe('Using gpt-4o...'); ...
Code excerptlines 411-423, bytes 13575-13975 test('should not upgrade gpt-4o for large data', () => { const largeData = 'x'.repeat(20000); // > 16200 chars const dataObject = { currentURL: 'https://example.com', resultData: largeData, prompt: 'Test prompt', gptModel: 'gpt-4o' }; sendToGPT(dataObject, 'test-key'); expect(mockResponseSpan.innerText).toBe('Using gpt-4o...'); ...test('should truncate extremely large data', () => { const veryLargeData = 'x'.repeat(150000); // > 130872 chars const dataObject = { currentURL: 'https://example.com', resultData: veryLargeData, prompt: 'Test prompt', gptModel: 'gpt-4o' }; sendToGPT(dataObject, 'test-key'); expect(console.log).toHaveBeenCalledWith('Data truncated...
Code excerptlines 425-437, bytes 13982-14416 test('should truncate extremely large data', () => { const veryLargeData = 'x'.repeat(150000); // > 130872 chars const dataObject = { currentURL: 'https://example.com', resultData: veryLargeData, prompt: 'Test prompt', gptModel: 'gpt-4o' }; sendToGPT(dataObject, 'test-key'); expect(console.log).toHaveBeenCalledWith('Data truncated...\n});describe('API Request Configuration', () => { test('should configure GPT-5 request correctly', () => { const dataObject = { currentURL: 'https://example.com', resultData: 'Test data', prompt: 'Test prompt', gptModel: 'gpt-5-nano' }; sendToGPT(dataObject, 'test-key'); expect(mockFetch).toHaveBeenCalledWith('https://api.openai.com/v1/re...
Code excerptlines 440-495, bytes 14427-16346 describe('API Request Configuration', () => { test('should configure GPT-5 request correctly', () => { const dataObject = { currentURL: 'https://example.com', resultData: 'Test data', prompt: 'Test prompt', gptModel: 'gpt-5-nano' }; sendToGPT(dataObject, 'test-key'); expect(mockFetch).toHaveBeenCalledWith('https://api.openai.com/v1/re...test('should configure GPT-5 request correctly', () => { const dataObject = { currentURL: 'https://example.com', resultData: 'Test data', prompt: 'Test prompt', gptModel: 'gpt-5-nano' }; sendToGPT(dataObject, 'test-key'); expect(mockFetch).toHaveBeenCalledWith('https://api.openai.com/v1/responses', { method: 'POST', head...
Code excerptlines 441-466, bytes 14477-15399 describe('API Request Configuration', () => {\ntest('should configure GPT-5 request correctly', () => { const dataObject = { currentURL: 'https://example.com', resultData: 'Test data', prompt: 'Test prompt', gptModel: 'gpt-5-nano' }; sendToGPT(dataObject, 'test-key'); expect(mockFetch).toHaveBeenCalledWith('https://api.openai.com/v1/responses', { method: 'POST', head...test('should configure standard model request correctly', () => { const dataObject = { currentURL: 'https://example.com', resultData: 'Test data', prompt: 'Test prompt', gptModel: 'gpt-4o' }; sendToGPT(dataObject, 'test-key'); expect(mockFetch).toHaveBeenCalledWith('https://api.openai.com/v1/chat/completions', { method: 'POST', ...
Code excerptlines 468-494, bytes 15406-16340 test('should configure standard model request correctly', () => { const dataObject = { currentURL: 'https://example.com', resultData: 'Test data', prompt: 'Test prompt', gptModel: 'gpt-4o' }; sendToGPT(dataObject, 'test-key'); expect(mockFetch).toHaveBeenCalledWith('https://api.openai.com/v1/chat/completions', { method: 'POST', ...\n});describe('Response Handling', () => { test('should handle successful GPT-5 response', async () => { mockFetch.mockResolvedValueOnce({ ok: true, text: () => Promise.resolve(JSON.stringify({ output: { content: { text: 'GPT-5 response content' } }, status: 'complete' })) }); const dataObject = { currentURL: 'https://example....
Code excerptlines 497-628, bytes 16351-20297 describe('Response Handling', () => { test('should handle successful GPT-5 response', async () => { mockFetch.mockResolvedValueOnce({ ok: true, text: () => Promise.resolve(JSON.stringify({ output: { content: { text: 'GPT-5 response content' } }, status: 'complete' })) }); const dataObject = { currentURL: 'https://example....test('should handle successful GPT-5 response', async () => { mockFetch.mockResolvedValueOnce({ ok: true, text: () => Promise.resolve(JSON.stringify({ output: { content: { text: 'GPT-5 response content' } }, status: 'complete' })) }); const dataObject = { currentURL: 'https://example.com', resultData: 'Test data', ...
Code excerptlines 498-521, bytes 16393-17140 describe('Response Handling', () => {\ntest('should handle successful GPT-5 response', async () => { mockFetch.mockResolvedValueOnce({ ok: true, text: () => Promise.resolve(JSON.stringify({ output: { content: { text: 'GPT-5 response content' } }, status: 'complete' })) }); const dataObject = { currentURL: 'https://example.com', resultData: 'Test data', ...test('should handle successful standard model response', async () => { mockFetch.mockResolvedValueOnce({ ok: true, text: () => Promise.resolve(JSON.stringify({ choices: [{ message: { content: 'Standard model response' }, finish_reason: 'stop' }], usage: { total_tokens: 100 } })) }); const dataObjec...
Code excerptlines 523-549, bytes 17147-17974 test('should handle successful standard model response', async () => { mockFetch.mockResolvedValueOnce({ ok: true, text: () => Promise.resolve(JSON.stringify({ choices: [{ message: { content: 'Standard model response' }, finish_reason: 'stop' }], usage: { total_tokens: 100 } })) }); const dataObjec...test('should handle API error response', async () => { mockFetch.mockResolvedValueOnce({ ok: true, text: () => Promise.resolve(JSON.stringify({ error: { message: 'Invalid API key', type: 'authentication_error' } })) }); const dataObject = { currentURL: 'https://example.com', resultData: 'Test...
Code excerptlines 551-576, bytes 17981-18749 test('should handle API error response', async () => { mockFetch.mockResolvedValueOnce({ ok: true, text: () => Promise.resolve(JSON.stringify({ error: { message: 'Invalid API key', type: 'authentication_error' } })) }); const dataObject = { currentURL: 'https://example.com', resultData: 'Test...test('should handle truncated GPT-5 response', async () => { mockFetch.mockResolvedValueOnce({ ok: true, text: () => Promise.resolve(JSON.stringify({ output: { content: { text: 'Truncated response' } }, status: 'incomplete', incomplete_details: { reason: 'max_tokens' } })) }); const dataObject = { currentURL: 'htt...
Code excerptlines 578-601, bytes 18756-19532 test('should handle truncated GPT-5 response', async () => { mockFetch.mockResolvedValueOnce({ ok: true, text: () => Promise.resolve(JSON.stringify({ output: { content: { text: 'Truncated response' } }, status: 'incomplete', incomplete_details: { reason: 'max_tokens' } })) }); const dataObject = { currentURL: 'htt...test('should handle truncated standard response', async () => { mockFetch.mockResolvedValueOnce({ ok: true, text: () => Promise.resolve(JSON.stringify({ choices: [{ message: { content: 'Truncated response' }, finish_reason: 'length' }] })) }); const dataObject = { currentURL: 'https://example.com', ...
Code excerptlines 603-627, bytes 19539-20291 test('should handle truncated standard response', async () => { mockFetch.mockResolvedValueOnce({ ok: true, text: () => Promise.resolve(JSON.stringify({ choices: [{ message: { content: 'Truncated response' }, finish_reason: 'length' }] })) }); const dataObject = { currentURL: 'https://example.com', ...\n});describe('Error Handling', () => { test('should handle exceptions and call catch block', () => { // Test that we have a try-catch block that handles errors const dataObject = { currentURL: 'https://example.com', resultData: null, // This will be caught by the null check first prompt: 'Test prompt', gptModel: 'gpt-4o' }; // This should ...
Code excerptlines 630-665, bytes 20302-21543 describe('Error Handling', () => { test('should handle exceptions and call catch block', () => { // Test that we have a try-catch block that handles errors const dataObject = { currentURL: 'https://example.com', resultData: null, // This will be caught by the null check first prompt: 'Test prompt', gptModel: 'gpt-4o' }; // This should ...test('should handle exceptions and call catch block', () => { // Test that we have a try-catch block that handles errors const dataObject = { currentURL: 'https://example.com', resultData: null, // This will be caught by the null check first prompt: 'Test prompt', gptModel: 'gpt-4o' }; // This should trigger the null data check, not an e...
Code excerptlines 631-646, bytes 20341-20973 describe('Error Handling', () => {\ntest('should handle exceptions and call catch block', () => { // Test that we have a try-catch block that handles errors const dataObject = { currentURL: 'https://example.com', resultData: null, // This will be caught by the null check first prompt: 'Test prompt', gptModel: 'gpt-4o' }; // This should trigger the null data check, not an e...test('should handle malformed cache JSON', () => { // Set invalid JSON in sessionStorage sessionStorage.setItem('invalid-json', 'not valid json'); const dataObject = { currentURL: 'https://example.com', resultData: 'Test data', prompt: 'Test prompt', gptModel: 'gpt-4o' }; // Should not throw error expect(() => sendToGP...
Code excerptlines 648-664, bytes 20980-21537 test('should handle malformed cache JSON', () => { // Set invalid JSON in sessionStorage sessionStorage.setItem('invalid-json', 'not valid json'); const dataObject = { currentURL: 'https://example.com', resultData: 'Test data', prompt: 'Test prompt', gptModel: 'gpt-4o' }; // Should not throw error expect(() => sendToGP...\n});describe('Data Sanitization', () => { test('should sanitize data properly', () => { const dataObject = { currentURL: 'https://example.com', resultData: 'Test\ndata with tabs\tand\ttabs', prompt: 'Test prompt', gptModel: 'gpt-4o' }; sendToGPT(dataObject, 'test-key'); // Check that fetch was called expect(mockFetch).toHaveBeenCall...
Code excerptlines 667-715, bytes 21548-23473 describe('Data Sanitization', () => { test('should sanitize data properly', () => { const dataObject = { currentURL: 'https://example.com', resultData: 'Test\ndata with tabs\tand\ttabs', prompt: 'Test prompt', gptModel: 'gpt-4o' }; sendToGPT(dataObject, 'test-key'); // Check that fetch was called expect(mockFetch).toHaveBeenCall...\n});test('should sanitize data properly', () => { const dataObject = { currentURL: 'https://example.com', resultData: 'Test\ndata with tabs\tand\ttabs', prompt: 'Test prompt', gptModel: 'gpt-4o' }; sendToGPT(dataObject, 'test-key'); // Check that fetch was called expect(mockFetch).toHaveBeenCalled(); if (mockFetch.mock.ca...
Code excerptlines 668-694, bytes 21590-22671 describe('Data Sanitization', () => {\ntest('should sanitize data properly', () => { const dataObject = { currentURL: 'https://example.com', resultData: 'Test\ndata with tabs\tand\ttabs', prompt: 'Test prompt', gptModel: 'gpt-4o' }; sendToGPT(dataObject, 'test-key'); // Check that fetch was called expect(mockFetch).toHaveBeenCalled(); if (mockFetch.mock.ca...test('should preserve quotes and backslashes in flow data', () => { // flow filters/formulas often contain quotes and backslashes; building the // payload as plain objects + JSON.stringify must pass them through intact const dataObject = { currentURL: 'https://example.com', resultData: 'Filter: Name = "Acme \'HQ\'" AND Path = C:\\temp', prompt: 'Test p...
Code excerptlines 696-714, bytes 22678-23467 test('should preserve quotes and backslashes in flow data', () => { // flow filters/formulas often contain quotes and backslashes; building the // payload as plain objects + JSON.stringify must pass them through intact const dataObject = { currentURL: 'https://example.com', resultData: 'Filter: Name = "Acme \'HQ\'" AND Path = C:\\temp', prompt: 'Test p...\n});
global.fetch = jest.fn(() => Promise.resolve({ ok: true, status: 200, text: () => Promise.resolve(''), json: () => Promise.resolve({}), }) );
Code excerptlines 31-38, bytes 657-802 // Mock fetch\nglobal.fetch = jest.fn(() => Promise.resolve({ ok: true, status: 200, text: () => Promise.resolve(''), json: () => Promise.resolve({}), }) );
Shipped source maps
Total byte savings5.65 MBConsole statements
Console logging in production can expose debugging output.
scripts/content.jsMedium
console.log
3 calls- console.log( 'Flow Extension: subflow definitions unavailable', e )
- console.log( 'Flow Extension: run stats unavailable', e )
- console.log( anItem )
scripts/popup.jsMedium
console.log
2 calls- console.log( `Data size (${ data.length } chars) requires upgrade to ${ model }` )
- console.log( 'Data truncated to fit model context window' )
console.error
2 calls- console.error( 'Flow parsing failed:', e )
- console.error( e )
tests/node_modules/@babel/core/lib/config/config-chain.jsMedium
console.log
3 calls- console.log(`Babel configs on "${context.filename}" (ascending priority):\n` + [configReport, babelR
- console.log(message)
- console.log(message)
tests/node_modules/@babel/parser/bin/babel-parser.jsMedium
console.log
1 call- console.log(JSON.stringify(ast, null, " "))
console.error
1 call- console.error("no filename specified")
tests/node_modules/@babel/traverse/lib/scope/index.jsMedium
console.log
3 calls- console.log(sep)
- console.log("#", scope.block.type)
- console.log(sep)
tests/node_modules/@jest/core/build/runJest.jsMedium
console.log
2 calls- console.log(JSON.stringify(testsPaths))
- console.log(testsPaths.join('\n'))
tests/node_modules/@sinonjs/commons/lib/deprecated.jsMedium
console.log
1 call- console.log(msg)
tests/node_modules/acorn/dist/bin.jsMedium
console.log
1 call- console.log(JSON.stringify(result, function (_, value) { return typeof value === "bigint" ? null : v
console.error
1 call- console.error(fileMode ? e.message.replace(/\(\d+:\d+\)$/, function (m) { return m.slice(0, 1) + inp
tests/node_modules/babel-plugin-istanbul/lib/load-nyc-config-sync.jsMedium
console.log
2 calls- console.log(JSON.stringify(await loadNycConfig({ cwd, nycrcPath })))
- console.log(JSON.stringify({ 'load-nyc-config-sync-error': error.message }))
tests/node_modules/braces/lib/compile.jsMedium
console.log
1 call- console.log('node.isClose', prefix, node.value)
tests/node_modules/create-jest/build/runCreate.jsMedium
console.log
10 calls- console.log()
- console.log('Aborting...')
- console.log()
- console.log( _chalk().default.underline( 'The following questions will help Jest to create
- console.log()
- console.log('Aborting...')
- console.log('')
- console.log( `✏️ Modified ${_chalk().default.cyan(projectPackageJsonPath)}` )
- console.log('')
- console.log( `📝 Configuration file created at ${_chalk().default.cyan(jestConfigPath)}` )
console.error
2 calls- console.error(_chalk().default.red(error.stack))
- console.error(_chalk().default.red(error))
tests/node_modules/emittery/index.jsMedium
console.log
1 call- console.log(`[${logTime}][emittery:${type}][${debugName}] Event Name: ${eventName}\n\tdata: ${eventD
tests/node_modules/escodegen/bin/escodegen.jsMedium
console.log
2 calls- console.log(optionator.generateHelp())
- console.log(escodegen.generate(syntax, options))
console.error
1 call- console.error('Error parsing config: ', err)
tests/node_modules/escodegen/bin/esgenerate.jsMedium
console.log
2 calls- console.log(optionator.generateHelp())
- console.log(escodegen.generate(JSON.parse(content), options))
console.error
1 call- console.error('Error parsing config: ', err)
tests/node_modules/esprima/bin/esparse.jsMedium
console.log
19 calls- console.log('Usage:')
- console.log(' esparse [options] [file.js]')
- console.log()
- console.log('Available options:')
- console.log()
- console.log(' --comment Gather all line and block comments in an array')
- console.log(' --loc Include line-column location info for each syntax node')
- console.log(' --range Include index-based range for each syntax node')
- console.log(' --raw Display the raw value of literals')
- console.log(' --tokens List all tokens in an array')
- console.log(' --tolerant Tolerate errors on a best-effort basis (experimental)')
- console.log(' -v, --version Shows program version')
- console.log()
- console.log('Error: more than one input file.')
- console.log('ECMAScript Parser (using Esprima version', esprima.version, ')')
- console.log()
- console.log('Error: unknown option ' + entry + '.')
- console.log(JSON.stringify(syntax, adjustRegexLiteral, 4))
- console.log('Error: ' + e.message)
tests/node_modules/esprima/bin/esvalidate.jsMedium
console.log
27 calls- console.log('Usage:')
- console.log(' esvalidate [options] [file.js...]')
- console.log()
- console.log('Available options:')
- console.log()
- console.log(' --format=type Set the report format, plain (default) or junit')
- console.log(' -v, --version Print program version')
- console.log()
- console.log('ECMAScript Validator (using Esprima version', esprima.version, ')')
- console.log()
- console.log('Error: unknown report format ' + options.format + '.')
- console.log('Error: unknown option ' + entry + '.')
- console.log('<?xml version="1.0" encoding="UTF-8"?>')
- console.log('<testsuites>')
- console.log('<testsuite name="' + fname + '" errors="0" ' + ' failures="' + syntax.e
- console.log(' <testcase name="Line ' + error.lineNumber + ': ' + msg + '" ' + '
- console.log(' <error type="SyntaxError" message="' + error.message + '">' + e
- console.log(' </testcase>')
- console.log('</testsuite>')
- console.log(msg)
- console.log('<testsuite name="' + fname + '" errors="1" failures="0" tests="1" ' + '
- console.log(' <testcase name="' + e.message + '" ' + ' time="0">')
- console.log(' <error type="ParseError" message="' + e.message + '">' + e.message + '
- console.log(' </testcase>')
- console.log('</testsuite>')
- console.log(fname + ':' + e.lineNumber + ': ' + e.message.replace(/^Line\ [0-9]*\:\ /, ''))
- console.log('</testsuites>')
tests/node_modules/fast-json-stable-stringify/example/key_cmp.jsMedium
console.log
1 call- console.log(s)
tests/node_modules/fast-json-stable-stringify/example/nested.jsMedium
console.log
1 call- console.log(stringify(obj))
tests/node_modules/fast-json-stable-stringify/example/str.jsMedium
console.log
1 call- console.log(stringify(obj))
tests/node_modules/fast-json-stable-stringify/example/value_cmp.jsMedium
console.log
1 call- console.log(s)
tests/node_modules/import-local/fixtures/cli.jsMedium
console.log
1 call- console.log('local')
tests/node_modules/istanbul-lib-instrument/node_modules/semver/bin/semver.jsMedium
console.log
2 calls- console.log(v)
- console.log( `SemVer ${version} A JavaScript implementation of the https://semver.org/ specificatio
console.error
1 call- console.error('--inc can only be used on a single version with no range')
tests/node_modules/istanbul-reports/lib/html-spa/index.jsMedium
console.log
1 call- console.log('Write asset: ' + dest)
tests/node_modules/istanbul-reports/lib/html/index.jsMedium
console.log
1 call- console.log('Write asset: ' + dest)
tests/node_modules/jest-config/build/normalize.jsMedium
console.log
1 call- console.log( _chalk().default.red( ` Invalid testPattern ${testPathPattern} supplied. ` +
tests/node_modules/jest-snapshot/node_modules/semver/bin/semver.jsMedium
console.log
2 calls- console.log(v)
- console.log( `SemVer ${version} A JavaScript implementation of the https://semver.org/ specificatio
console.error
1 call- console.error('--inc can only be used on a single version with no range')
tests/node_modules/js-yaml/bin/js-yaml.jsMedium
console.log
2 calls- console.log(JSON.stringify(output, null, ' '))
- console.log(yaml.dump(output))
console.error
5 calls- console.error('File not found: ' + options.file)
- console.error( options.trace && error.stack || error.message || String(error))
- console.error(e.stack)
- console.error(e.toString(options.compact))
- console.error( options.trace && err.stack || err.message || String(err))
tests/node_modules/json5/lib/cli.jsMedium
console.log
2 calls- console.log(pkg.version)
- console.log( ` Usage: json5 [options] <file> If <file> is not provided, then STDIN is u
console.error
1 call- console.error(err.message)
tests/node_modules/make-dir/node_modules/semver/bin/semver.jsMedium
console.log
2 calls- console.log(v)
- console.log( `SemVer ${version} A JavaScript implementation of the https://semver.org/ specificatio
console.error
1 call- console.error('--inc can only be used on a single version with no range')
tests/node_modules/nwsapi/src/nwsapi.jsMedium
console.log
1 call- console.log(message)
tests/node_modules/psl/types/test.tsMedium
console.log
3 calls- console.log(x(psl.parse('')))
- console.log(psl.get('example.com'))
- console.log(psl.isValid('example.com'))
tests/node_modules/resolve/example/async.jsMedium
console.log
1 call- console.log(res)
console.error
1 call- console.error(err)
tests/node_modules/resolve/example/sync.jsMedium
console.log
1 call- console.log(res)
tests/node_modules/resolve/test/dotdot/abc/index.jsMedium
console.log
1 call- console.log(x)
tests/node_modules/resolve/test/precedence/aaa/main.jsMedium
console.log
1 call- console.log(require('./'))
tests/node_modules/resolve/test/precedence/bbb/main.jsMedium
console.log
1 call- console.log(require('./'))
tests/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.jsMedium
console.log
1 call- console.log(' * all monorepo paths successfully resolved through symlinks')
tests/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.jsMedium
console.log
4 calls- console.log(a, ': require.resolve, preserveSymlinks ' + (process.execArgv.indexOf('preserve-symlinks
- console.log(b, ': preserveSymlinks true')
- console.log(c, ': preserveSymlinks false')
- console.log('async: success! a matched either b or c\n')
tests/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.jsMedium
console.log
4 calls- console.log(a, ': require.resolve, preserveSymlinks ' + (process.execArgv.indexOf('preserve-symlinks
- console.log(b, ': preserveSymlinks true')
- console.log(c, ': preserveSymlinks false')
- console.log('sync: success! a matched either b or c\n')
tests/node_modules/semver/bin/semver.jsMedium
console.log
2 calls- console.log(v)
- console.log(['SemVer ' + version, '', 'A JavaScript implementation of the https://semver.org
console.error
1 call- console.error('--inc can only be used on a single version with no range')
tests/sendToGPT.test.jsMedium
console.log
2 calls- console.log(`Data size (${data.length} chars) requires upgrade from ${originalModel} to ${model}`)
- console.log('Data truncated to fit model context window')
console.error
1 call- console.error('Fetch error:', error)
tests/node_modules/@babel/core/lib/config/files/module-types.jsMedium
console.error
1 call- console.error("`.cts` configuration file failed to load, please try to update `@babel/preset-typescr
tests/node_modules/@babel/generator/lib/index.jsMedium
console.error
1 call- console.error("[BABEL] Note: The code generator has deoptimised the styling of " + `${opts.filename}
tests/node_modules/@jest/core/build/cli/index.jsMedium
console.error
1 call- console.error(message)
tests/node_modules/@jest/core/build/getChangedFilesPromise.jsMedium
console.error
1 call- console.error(_chalk().default.red(`\n\n${message}`))
tests/node_modules/@jest/reporters/build/CoverageReporter.jsMedium
console.error
2 calls- console.error( _chalk().default.red(` Failed to write coverage reports: ERRO
- console.error( _chalk().default.red( [ `Failed to collect
tests/node_modules/@jest/reporters/build/CoverageWorker.jsMedium
console.error
1 call- console.error(err.stack)
tests/node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument/src/visitor.jsMedium
console.error
2 calls- console.error( 'Unable to insert counter for node type:', path.node.
- console.error( 'Unable to process function body node type:', path.no
tests/node_modules/fb-watchman/index.jsMedium
console.error
2 calls- console.error('Watchman: ', error.message)
- console.error(data)
tests/node_modules/fs.realpath/old.jsMedium
console.error
1 call- console.error(msg)
console.trace
1 call- console.trace(msg)
tests/node_modules/graceful-fs/graceful-fs.jsMedium
console.error
1 call- console.error(m)
tests/node_modules/iconv-lite/lib/index.jsMedium
console.error
2 calls- console.error('Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/a
- console.error("iconv-lite warning: js files use non-utf8 encoding. See https://github.com/ashtuchkin
tests/node_modules/istanbul-lib-instrument/node_modules/semver/internal/debug.jsMedium
console.error
1 call- console.error('SEMVER', ...args)
tests/node_modules/istanbul-lib-instrument/src/visitor.jsMedium
console.error
2 calls- console.error( 'Unable to insert counter for node type:', path.node.
- console.error( 'Unable to process function body node type:', path.no
tests/node_modules/jest-cli/build/run.jsMedium
console.error
2 calls- console.error(_chalk().default.red(error.stack))
- console.error(_chalk().default.red(error))
console.warn
1 call- console.warn( `${_chalk().default.bold( 'Force exiting Jest: ' )}Have you
tests/node_modules/jest-runner/build/index.jsMedium
console.error
1 call- console.error( _chalk().default.yellow( 'A worker process has failed to exit g
tests/node_modules/jest-runner/build/runTest.jsMedium
console.error
1 call- console.error( `Test environment found at "${testEnvironment}" does not export a "getVmContext
tests/node_modules/jest-runner/build/testWorker.jsMedium
console.error
1 call- console.error(err.stack)
tests/node_modules/jest-runtime/build/index.jsMedium
console.error
1 call- console.error( `\n${message}\n${(0, _jestMessageUtil().formatStackTrace)( stack,
tests/node_modules/jest-snapshot/node_modules/semver/internal/debug.jsMedium
console.error
1 call- console.error('SEMVER', ...args)
tests/node_modules/jest-worker/build/workers/ChildProcessWorker.jsMedium
console.error
2 calls- console.error('Error looking for out of memory crash', err)
- console.error('Unable to check memory usage', err)
console.warn
2 calls- console.warn('Unable to detect out of memory event if silent === false')
- console.warn( 'Memory usage of workers can only be checked if a limit is set' )
tests/node_modules/make-dir/node_modules/semver/internal/debug.jsMedium
console.error
1 call- console.error('SEMVER', ...args)
tests/node_modules/source-map-support/source-map-support.jsMedium
console.error
3 calls- console.error()
- console.error(source)
- console.error(error.stack)
tests/node_modules/@babel/code-frame/lib/index.jsMedium
console.warn
1 call- console.warn(new Error(message))
tests/node_modules/@babel/generator/lib/generators/modules.jsMedium
console.warn
1 call- console.warn(`\ You are using import attributes, without specifying the desired output syntax. Pleas
tests/node_modules/@babel/helper-compilation-targets/lib/index.jsMedium
console.warn
3 calls- console.warn("Warning, the following targets are using a decimal version:\n")
- console.warn(` ${target}: ${value}`)
- console.warn(` We recommend using a string for minor/patch versions to avoid numbers like 6.10 getti
tests/node_modules/@babel/helpers/lib/helpers/applyDecs.jsMedium
console.warn
1 call- console.warn(".initializer has been renamed to .init as of March 2022")
tests/node_modules/@babel/types/lib/index.jsMedium
console.warn
1 call- console.warn("BABEL_TYPES_8_BREAKING is not supported anymore. Use the latest Babel 8.0.0 pre-releas
tests/node_modules/@babel/types/lib/utils/deprecationWarning.jsMedium
console.warn
1 call- console.warn(`${prefix}\`${oldName}\` has been deprecated, please migrate to \`${newName}\`\n${trace
tests/node_modules/@jest/transform/build/ScriptTransformer.jsMedium
console.warn
1 call- console.warn( (0, _runtimeErrorsAndWarnings.makeInvalidSourceMapWarning)( file
tests/node_modules/@sinonjs/fake-timers/src/fake-timers-src.jsMedium
console.warn
1 call- console.warn(msg)
tests/node_modules/acorn/dist/acorn.jsMedium
console.warn
1 call- console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will
tests/node_modules/acorn/dist/acorn.mjsMedium
console.warn
1 call- console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will
tests/node_modules/debug/src/common.jsMedium
console.warn
1 call- console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will b
tests/node_modules/istanbul-reports/lib/lcovonly/index.jsMedium
console.warn
1 call- console.warn('Missing coverage entries in', fileName, key)
tests/node_modules/jest-haste-map/build/crawlers/watchman.jsMedium
console.warn
1 call- console.warn('watchman warning: ', response.warning)
tests/node_modules/jest-haste-map/build/watchers/WatchmanWatcher.jsMedium
console.warn
2 calls- console.warn('[sane] Warning: Lost connection to watchman, reconnecting..')
- console.warn(resp.warning)
tests/node_modules/jest-validate/build/utils.jsMedium
console.warn
1 call- console.warn( _chalk().default.yellow( `${_chalk().default.bold(name)}:\n\n${message}${com
tests/node_modules/jest-worker/build/workers/NodeThreadsWorker.jsMedium
console.warn
1 call- console.warn( 'Memory usage of workers can only be checked if a limit is set' )
tests/node_modules/json5/dist/index.jsMedium
console.warn
1 call- console.warn(("JSON5: '" + (formatChar(c)) + "' in strings is not valid ECMAScript; consider escapin
tests/node_modules/json5/dist/index.min.mjsMedium
console.warn
1 call- console.warn(`JSON5: '${formatChar(u)}' in strings is not valid ECMAScript; consider escaping`)
tests/node_modules/json5/dist/index.mjsMedium
console.warn
1 call- console.warn(`JSON5: '${formatChar(c)}' in strings is not valid ECMAScript; consider escaping`)
tests/node_modules/json5/lib/parse.jsMedium
console.warn
1 call- console.warn(`JSON5: '${formatChar(c)}' in strings is not valid ECMAScript; consider escaping`)
tests/node_modules/json5/lib/require.jsMedium
console.warn
1 call- console.warn("'json5/require' is deprecated. Please use 'json5/register' instead.")
tests/node_modules/react-is/umd/react-is.development.jsMedium
console.warn
2 calls- console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in Re
- console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed
tests/node_modules/xmlchars/xmlchars.jsMedium
console.warn
1 call- console.warn("DEPRECATION WARNING: the xmlchar *module* is deprecated: please \ replace e.g. require
tests/node_modules/concat-map/example/map.jsMedium
console.dir
1 call- console.dir(ys)
Shipped cleanup debt
Occurrences349 occurrencestests/node_modules/@ampproject/remapping/dist/remapping.mjsLow
TODO
2 comments- TODO: Eventually support sourceRoot, which has to be removed because the sources are already
- TODO: We should eventually support async loading of sourcemap files.
tests/node_modules/@ampproject/remapping/dist/remapping.umd.jsLow
TODO
2 comments- TODO: Eventually support sourceRoot, which has to be removed because the sources are already
- TODO: We should eventually support async loading of sourcemap files.
tests/node_modules/@babel/compat-data/corejs2-built-ins.jsLow
TODO
1 comment- Todo (Babel 8): remove this file as Babel 8 drop support of core-js 2
tests/node_modules/@babel/compat-data/corejs3-shipped-proposals.jsLow
TODO
1 comment- Todo (Babel 8): remove this file now that it is included in babel-plugin-polyfill-corejs3
tests/node_modules/@babel/compat-data/native-modules.jsLow
TODO
1 comment- Todo (Babel 8): remove this file, in Babel 8 users import the .json directly
tests/node_modules/@babel/compat-data/overlapping-plugins.jsLow
TODO
1 comment- Todo (Babel 8): remove this file, in Babel 8 users import the .json directly
tests/node_modules/@babel/compat-data/plugin-bugfixes.jsLow
TODO
1 comment- Todo (Babel 8): remove this file, in Babel 8 users import the .json directly
tests/node_modules/@babel/compat-data/plugins.jsLow
TODO
1 comment- Todo (Babel 8): remove this file, in Babel 8 users import the .json directly
tests/node_modules/@babel/parser/typings/babel-parser.d.tsLow
TODO
1 comment- todo(flow->ts) real token type
tests/node_modules/@bcoe/v8-coverage/dist/lib/_src/normalize.tsLow
TODO
1 comment- Normalizes a function coverage. Sorts the ranges (pre-order sort). TODO: Tree-based normalization of the ranges. @param funcCov Function coverage to normalize.
tests/node_modules/@bcoe/v8-coverage/dist/lib/_src/range-tree.tsLow
TODO
1 comment- TODO(perf): Binary search (check overhead)
tests/node_modules/@bcoe/v8-coverage/dist/lib/normalize.d.tsLow
TODO
1 comment- Normalizes a function coverage. Sorts the ranges (pre-order sort). TODO: Tree-based normalization of the ranges. @param funcCov Function coverage to normalize.
tests/node_modules/@bcoe/v8-coverage/dist/lib/normalize.jsLow
TODO
1 comment- Normalizes a function coverage. Sorts the ranges (pre-order sort). TODO: Tree-based normalization of the ranges. @param funcCov Function coverage to normalize.
tests/node_modules/@bcoe/v8-coverage/dist/lib/normalize.mjsLow
TODO
1 comment- Normalizes a function coverage. Sorts the ranges (pre-order sort). TODO: Tree-based normalization of the ranges. @param funcCov Function coverage to normalize.
tests/node_modules/@bcoe/v8-coverage/dist/lib/range-tree.jsLow
TODO
1 comment- TODO(perf): Binary search (check overhead)
tests/node_modules/@bcoe/v8-coverage/dist/lib/range-tree.mjsLow
TODO
1 comment- TODO(perf): Binary search (check overhead)
tests/node_modules/@bcoe/v8-coverage/src/lib/normalize.tsLow
TODO
1 comment- Normalizes a function coverage. Sorts the ranges (pre-order sort). TODO: Tree-based normalization of the ranges. @param funcCov Function coverage to normalize.
tests/node_modules/@bcoe/v8-coverage/src/lib/range-tree.tsLow
TODO
1 comment- TODO(perf): Binary search (check overhead)
tests/node_modules/@jest/fake-timers/build/legacyFakeTimers.jsLow
TODO
1 comment- TODO: Use performance.now() once it's mocked
tests/node_modules/@jest/reporters/build/generateEmptyCoverage.jsLow
TODO
1 comment- TODO: consider passing AST
tests/node_modules/@jest/reporters/build/index.d.tsLow
TODO
1 comment- Called before running a spec (prior to `before` hooks) Not called for `skipped` and `todo` specs
tests/node_modules/@jest/test-result/build/helpers.jsLow
TODO
1 comment- `todos` are new as of Jest 24, and not all runners return it.
tests/node_modules/@jest/transform/build/ScriptTransformer.jsLow
TODO
1 comment- TODO: do we need to define the generics twice?
tests/node_modules/@jridgewell/gen-mapping/src/gen-mapping.tsLow
TODO
1 comment- TODO: implement originalScopes/generatedRanges
tests/node_modules/@types/babel__traverse/index.d.tsLow
XXX
2 comments- #region ------------------------- isXXX -------------------------
- #region ------------------------- assertXXX -------------------------
tests/node_modules/@types/node/compatibility/iterators.d.tsLow
TODO
1 comment- TODO: remove once this package no longer supports TS 5.5, and replace NodeJS.BuiltinIteratorReturn with BuiltinIteratorReturn.
tests/node_modules/@types/node/fs/promises.d.tsLow
TODO
1 comment- TODO: Add `EventEmitter` close
tests/node_modules/@types/node/module.d.tsLow
TODO
1 comment- TODO: consider removing in a future major version update
tests/node_modules/@types/node/perf_hooks.d.tsLow
TODO
1 comment- TODO: Narrow this based on entry type.
tests/node_modules/@types/node/test.d.tsLow
TODO
8 comments- Shorthand for marking a suite as `TODO`. This is the same as calling {@link suite} with `options.todo` set to `true`. @since v20.13.0
- Shorthand for marking a test as `TODO`. This is the same as calling {@link test} with `options.todo` set to `true`. @since v20.2.0
- Present if `context.todo` is called.
- Present if `context.todo` is called.
- Present if `context.todo` is called.
- The total number of TODO tests.
- This function adds a `TODO` directive to the test's output. If `message` is provided, it is included in the output. Calling `todo()` does not terminate execution of the test function. This function does not return a value. ```js test('top level test', (t) => { // This test is marked as `TODO` t.todo('this is a todo'); }); ``` @since v18.0.0, v16.17.0 @param message Optional `TODO` message.
- If truthy, the test marked as `TODO`. If a string is provided, that string is displayed in the test results as the reason why the test is `TODO`. @default false
tests/node_modules/@types/node/timers.d.tsLow
TODO
1 comment- TODO: remove in a future major version bump
tests/node_modules/@types/node/url.d.tsLow
HACK
1 comment- The `url.parse()` method takes a URL string, parses it, and returns a URL object. A `TypeError` is thrown if `urlString` is not a string. A `URIError` is thrown if the `auth` property is present but cannot be decoded. `url.parse()` uses a lenient, non-standard algorithm for parsing URL strings. It is prone to security issues such as [host name spoofing](https://hackerone.com/reports/678487) and incorrect handling of usernames and passwords. Do not use with untrusted input. CVEs are not issued for `url.parse()` vulnerabilities. Use the `WHATWG URL` API instead. @since v0.1.25 @deprecated Use the WHATWG URL API instead. @param urlString The URL string to parse. @param [parseQueryString=false] If `true`, the `query` property will always be set to an object returned by the {@link querystring} module's `parse()` method. If `false`, the `query` property on the returned URL object will be an unparsed, undecoded string. @param [slashesDenoteHost=false] If `true`, the first token after the literal string `//` and preceding the next `/` will be interpreted as the `host`. For instance, given `//foo/bar`, the result would be `{host: 'foo', pathname: '/bar'}` rather than `{pathname: '//foo/bar'}`.
tests/node_modules/@types/node/util.d.tsLow
TODO
1 comment- TODO: , inspect: inspect
tests/node_modules/@types/node/wasi.d.tsLow
TODO
3 comments- TODO: avoid DOM dependency until WASM moved to own lib.
- TODO: avoid DOM dependency until WASM moved to own lib.
- TODO: Narrow to DOM types
tests/node_modules/@types/node/worker_threads.d.tsLow
TODO
1 comment- TODO: remove in a future major @types/node version.
tests/node_modules/acorn/dist/acorn.jsLow
XXX
1 comment- Identifier or keyword. '\uXXXX' sequences are allowed in
tests/node_modules/acorn/dist/acorn.mjsLow
XXX
1 comment- Identifier or keyword. '\uXXXX' sequences are allowed in
tests/node_modules/agent-base/dist/src/index.jsLow
XXX
1 comment- XXX: non-documented `http` module API :(
tests/node_modules/agent-base/src/index.tsLow
XXX
1 comment- XXX: non-documented `http` module API :(
tests/node_modules/ansi-escapes/index.d.tsLow
TODO
1 comment- TODO: remove this in the next major version
tests/node_modules/ansi-escapes/index.jsLow
TODO
1 comment- TODO: remove this in the next major version
tests/node_modules/argparse/lib/help/formatter.jsLow
TODO
1 comment- class HelpFormatter Formatter for generating usage messages and argument help strings. Only the name of this class is considered a public API. All the methods provided by the class are considered an implementation detail. Do not call in your code, use this class only for inherits your own forvatter ToDo add [additonal formatters][1] [1]:http://docs.python.org/dev/library/argparse.html#formatter-class
tests/node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument/src/constants.jsLow
TODO
1 comment- TODO: increment this version if there are schema changes
tests/node_modules/call-bind-apply-helpers/index.jsLow
TODO
1 comment- @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.')
tests/node_modules/callsites/index.d.tsLow
TODO
1 comment- TODO: Remove this for the next major release, refactor the whole definition to:
tests/node_modules/callsites/index.jsLow
TODO
1 comment- TODO: Remove this for the next major release
tests/node_modules/camelcase/index.d.tsLow
TODO
1 comment- TODO: Remove this for the next major release, refactor the whole definition to:
tests/node_modules/camelcase/index.jsLow
TODO
1 comment- TODO: Remove this for the next major release
tests/node_modules/cjs-module-lexer/lexer.jsLow
TODO
1 comment- TODO: <!-- XML comment support
tests/node_modules/cliui/build/lib/string-utils.jsLow
TODO
1 comment- TODO: look at porting https://www.npmjs.com/package/wrap-ansi to ESM.
tests/node_modules/cssom/lib/CSSDocumentRule.jsLow
FIXME
1 comment- FIXME
tests/node_modules/cssom/lib/CSSFontFaceRule.jsLow
FIXME
1 comment- FIXME
tests/node_modules/cssom/lib/CSSHostRule.jsLow
FIXME
1 comment- FIXME
tests/node_modules/cssom/lib/CSSKeyframeRule.jsLow
FIXME
1 comment- FIXME
tests/node_modules/cssom/lib/CSSKeyframesRule.jsLow
FIXME
1 comment- FIXME
tests/node_modules/cssom/lib/CSSRule.jsLow
FIXME
1 comment- FIXME
tests/node_modules/cssom/lib/CSSStyleDeclaration.jsLow
FIXME
3 comments- FIXME
- FIXME
- FIXME
tests/node_modules/cssom/lib/CSSValue.jsLow
TODO
1 comment- @constructor @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSValue TODO: add if needed
tests/node_modules/cssom/lib/parse.jsLow
FIXME
1 comment- FIXME: what if this '{' is in the url text of the match function?
tests/node_modules/cssstyle/lib/CSSStyleDeclaration.jsLow
FIXME
3 comments- FIXME
- FIXME
- FIXME
tests/node_modules/cssstyle/lib/CSSStyleDeclaration.test.jsLow
TODO
1 comment- TODO - deprecated according to MDN and not implemented at all, can we remove?
tests/node_modules/cssstyle/node_modules/cssom/lib/CSSDocumentRule.jsLow
FIXME
1 comment- FIXME
tests/node_modules/cssstyle/node_modules/cssom/lib/CSSFontFaceRule.jsLow
FIXME
1 comment- FIXME
tests/node_modules/cssstyle/node_modules/cssom/lib/CSSHostRule.jsLow
FIXME
1 comment- FIXME
tests/node_modules/cssstyle/node_modules/cssom/lib/CSSKeyframeRule.jsLow
FIXME
1 comment- FIXME
tests/node_modules/cssstyle/node_modules/cssom/lib/CSSKeyframesRule.jsLow
FIXME
1 comment- FIXME
tests/node_modules/cssstyle/node_modules/cssom/lib/CSSMediaRule.jsLow
FIXME
1 comment- FIXME
tests/node_modules/cssstyle/node_modules/cssom/lib/CSSRule.jsLow
FIXME
1 comment- FIXME
tests/node_modules/cssstyle/node_modules/cssom/lib/CSSStyleDeclaration.jsLow
FIXME
3 comments- FIXME
- FIXME
- FIXME
tests/node_modules/cssstyle/node_modules/cssom/lib/CSSValue.jsLow
TODO
1 comment- @constructor @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSValue TODO: add if needed
tests/node_modules/cssstyle/node_modules/cssom/lib/parse.jsLow
FIXME
1 comment- FIXME: what if this '{' is in the url text of the match function?
tests/node_modules/debug/src/browser.jsLow
TODO
1 comment- Currently only WebKit-based Web Inspectors, Firefox >= v31, and the Firebug extension (any Firefox version) are known to support "%c" CSS customizations. TODO: add a `localStorage` variable to explicitly enable/disable colors
XXX
3 comments- XXX (@Qix-) should we be logging these?
- XXX (@Qix-) should we be logging these?
- XXX (@Qix-) should we be logging these?
tests/node_modules/debug/src/common.jsLow
XXX
2 comments- XXX Temporary. Will be removed in the next major release.
- XXX DO NOT USE. This is a temporary stub function. XXX It WILL be removed in the next major release.
tests/node_modules/decimal.js/decimal.jsLow
TODO
11 comments- TODO? Compare Newton's method.
- TODO? Replace with for-loop and checkRoundingDigits.
- Return a new Decimal whose value is the hyperbolic cosine of the value in radians of this Decimal. Domain: [-Infinity, Infinity] Range: [1, Infinity] cosh(x) = 1 + x^2/2! + x^4/4! + x^6/6! + ... cosh(0) = 1 cosh(-0) = 1 cosh(Infinity) = Infinity cosh(-Infinity) = Infinity cosh(NaN) = NaN x time taken (ms) result 1000 9 9.8503555700852349694e+433 10000 25 4.4034091128314607936e+4342 100000 171 1.4033316802130615897e+43429 1000000 3817 1.5166076984010437725e+434294 10000000 abandoned after 2 minute wait TODO? Compare performance of cosh(x) = 0.5 * (exp(x) + exp(-x))
- TODO? Estimation reused from cosine() and may not be optimal here.
- Return a new Decimal whose value is the hyperbolic sine of the value in radians of this Decimal. Domain: [-Infinity, Infinity] Range: [-Infinity, Infinity] sinh(x) = x + x^3/3! + x^5/5! + x^7/7! + ... sinh(0) = 0 sinh(-0) = -0 sinh(Infinity) = Infinity sinh(-Infinity) = -Infinity sinh(NaN) = NaN x time taken (ms) 10 2 ms 100 5 ms 1000 14 ms 10000 82 ms 100000 886 ms 1.4033316802130615897e+43429 200000 2613 ms 300000 5407 ms 400000 8824 ms 500000 13026 ms 8.7080643612718084129e+217146 1000000 48543 ms TODO? Compare performance of sinh(x) = 0.5 * (exp(x) - exp(-x))
- TODO? Special case acos(0.5) = pi/3 and acos(-0.5) = 2*pi/3
- Return a new Decimal whose value is the arcsine (inverse sine) in radians of the value of this Decimal. Domain: [-Infinity, Infinity] Range: [-pi/2, pi/2] asin(x) = 2*atan(x/(1 + sqrt(1 - x^2))) asin(0) = 0 asin(-0) = -0 asin(1/2) = pi/6 asin(-1/2) = -pi/6 asin(1) = pi/2 asin(-1) = -pi/2 asin(|x| > 1) = NaN asin(NaN) = NaN TODO? Compare performance of Taylor series.
- TODO? Special case asin(1/2) = pi/6 and asin(-1/2) = -pi/6
- TODO? if (x >= 1 && pr <= PI_PRECISION) atan(x) = halfPi * x.s - atan(1 / x);
- TODO? Replace with for-loop and checkRoundingDigits.
- TODO BigInt str: no need to check for decimal point, exponential form or leading zeros.
tests/node_modules/decimal.js/decimal.mjsLow
TODO
11 comments- TODO? Compare Newton's method.
- TODO? Replace with for-loop and checkRoundingDigits.
- Return a new Decimal whose value is the hyperbolic cosine of the value in radians of this Decimal. Domain: [-Infinity, Infinity] Range: [1, Infinity] cosh(x) = 1 + x^2/2! + x^4/4! + x^6/6! + ... cosh(0) = 1 cosh(-0) = 1 cosh(Infinity) = Infinity cosh(-Infinity) = Infinity cosh(NaN) = NaN x time taken (ms) result 1000 9 9.8503555700852349694e+433 10000 25 4.4034091128314607936e+4342 100000 171 1.4033316802130615897e+43429 1000000 3817 1.5166076984010437725e+434294 10000000 abandoned after 2 minute wait TODO? Compare performance of cosh(x) = 0.5 * (exp(x) + exp(-x))
- TODO? Estimation reused from cosine() and may not be optimal here.
- Return a new Decimal whose value is the hyperbolic sine of the value in radians of this Decimal. Domain: [-Infinity, Infinity] Range: [-Infinity, Infinity] sinh(x) = x + x^3/3! + x^5/5! + x^7/7! + ... sinh(0) = 0 sinh(-0) = -0 sinh(Infinity) = Infinity sinh(-Infinity) = -Infinity sinh(NaN) = NaN x time taken (ms) 10 2 ms 100 5 ms 1000 14 ms 10000 82 ms 100000 886 ms 1.4033316802130615897e+43429 200000 2613 ms 300000 5407 ms 400000 8824 ms 500000 13026 ms 8.7080643612718084129e+217146 1000000 48543 ms TODO? Compare performance of sinh(x) = 0.5 * (exp(x) - exp(-x))
- TODO? Special case acos(0.5) = pi/3 and acos(-0.5) = 2*pi/3
- Return a new Decimal whose value is the arcsine (inverse sine) in radians of the value of this Decimal. Domain: [-Infinity, Infinity] Range: [-pi/2, pi/2] asin(x) = 2*atan(x/(1 + sqrt(1 - x^2))) asin(0) = 0 asin(-0) = -0 asin(1/2) = pi/6 asin(-1/2) = -pi/6 asin(1) = pi/2 asin(-1) = -pi/2 asin(|x| > 1) = NaN asin(NaN) = NaN TODO? Compare performance of Taylor series.
- TODO? Special case asin(1/2) = pi/6 and asin(-1/2) = -pi/6
- TODO? if (x >= 1 && pr <= PI_PRECISION) atan(x) = halfPi * x.s - atan(1 / x);
- TODO? Replace with for-loop and checkRoundingDigits.
- TODO BigInt str: no need to check for decimal point, exponential form or leading zeros.
tests/node_modules/emittery/index.jsLow
TODO
1 comment- TODO: Use https://github.com/sindresorhus/safe-stringify when the package is more mature. Just copy-paste the code.
tests/node_modules/execa/lib/stream.jsLow
TODO
1 comment- @todo remove `|| spawned.stdin === undefined` once we drop support for Node.js <=12.2.0
tests/node_modules/expect/build/index.d.tsLow
TODO
1 comment- TODO should be: extends Array<unknown> = []
tests/node_modules/form-data/lib/form_data.jsLow
TODO
1 comment- TODO: Looks like there is bug in Node fs.createReadStream
tests/node_modules/glob/common.jsLow
TODO
1 comment- TODO: is an absolute `cwd` supposed to be resolved against `root`?
tests/node_modules/glob/glob.jsLow
XXX
1 comment- XXX review this. Shouldn't it be doing the mounting etc
tests/node_modules/glob/sync.jsLow
XXX
1 comment- XXX review this. Shouldn't it be doing the mounting etc
tests/node_modules/https-proxy-agent/dist/agent.jsLow
HACK
1 comment- See: https://hackerone.com/reports/541502
tests/node_modules/iconv-lite/encodings/dbcs-codec.jsLow
TODO
3 comments- TODO: What if we have no default? (resCode == undefined)
- See todo above.
- TODO: Callback with seq.
tests/node_modules/iconv-lite/encodings/dbcs-data.jsLow
TODO
3 comments- TODO: KDDI extension to Shift_JIS
- TODO: IBM CCSID 942 = CP932, but F0-F9 custom chars and other char changes.
- TODO: IBM CCSID 943 = Shift_JIS = CP932 with original Shift_JIS lower 128 chars.
XXX
2 comments- Introduced in 2000, revised 2004. Some characters are in Unicode Plane 2 (0x2xxxx)
- many unicode code points moved from PUA to Supplementary plane (U+2XXXX) over the years.
tests/node_modules/inflight/inflight.jsLow
XXX
1 comment- XXX It's somewhat ambiguous whether a new callback added in this
tests/node_modules/is-generator-fn/index.d.tsLow
TODO
1 comment- TODO: Remove this for the next major release, refactor the whole definition to:
tests/node_modules/is-generator-fn/index.jsLow
TODO
1 comment- TODO: Remove this for the next major release
tests/node_modules/istanbul-lib-instrument/node_modules/semver/classes/range.jsLow
TODO
1 comment- TODO build?
tests/node_modules/istanbul-lib-instrument/node_modules/semver/preload.jsLow
XXX
1 comment- XXX remove in v8 or beyond
tests/node_modules/istanbul-lib-instrument/src/constants.jsLow
TODO
1 comment- TODO: increment this version if there are schema changes
tests/node_modules/istanbul-lib-report/lib/report-base.jsLow
TODO
1 comment- TODO: switch to class private field when targetting node.js 12
tests/node_modules/jest-changed-files/build/git.jsLow
TODO
1 comment- TODO: Should we keep the original `message`?
tests/node_modules/jest-changed-files/build/hg.jsLow
TODO
1 comment- TODO: Should we keep the original `message`?
tests/node_modules/jest-changed-files/build/sl.jsLow
TODO
1 comment- TODO: Should we keep the original `message`?
tests/node_modules/jest-config/build/normalize.jsLow
TODO
1 comment- TODO: Type this properly
tests/node_modules/jest-diff/build/cleanupSemantic.jsLow
XXX
4 comments- e.g: <del>abcxxx</del><ins>xxxdef</ins>
- -> <del>abc</del>xxx<ins>def</ins>
- e.g: <del>xxxabc</del><ins>defxxx</ins>
- -> <ins>def</ins>xxx<del>abc</del>
tests/node_modules/jest-environment-jsdom/build/index.jsLow
TODO
1 comment- TODO: remove this ASAP, but it currently causes tests to run really slow
tests/node_modules/jest-message-util/build/index.jsLow
TODO
1 comment- TODO: check & read HasteFS instead of reading the filesystem:
tests/node_modules/jest-mock/build/index.jsLow
TODO
3 comments- TODO remove re-export in Jest 30
- TODO remove re-export in Jest 30
- TODO in Jest 30 remove `SpyInstance` in favour of `Spied`
tests/node_modules/jest-runner/build/index.jsLow
TODO
1 comment- TODO: Get appropriate type for `onCustomMessage`
tests/node_modules/jest-runtime/build/index.jsLow
TODO
8 comments- TODO: make mandatory in Jest 30
- TODO: will this work on windows? It might be better if `shouldInstrument` deals with it anyways
- TODO: consider warning somehow that this does nothing. We should support deletions, anyways
- TODO: remove this check in Jest 30
- TODO: remove this check in Jest 30
- TODO: remove this check in Jest 30
- TODO: remove this check in Jest 30
- TODO: remove this check in Jest 30
tests/node_modules/jest-snapshot/build/InlineSnapshots.jsLow
HACK
1 comment- A hack to prevent unexpected line breaks in the generated code
tests/node_modules/jest-snapshot/node_modules/semver/classes/range.jsLow
TODO
1 comment- TODO build?
tests/node_modules/jest-snapshot/node_modules/semver/preload.jsLow
XXX
1 comment- XXX remove in v8 or beyond
tests/node_modules/jest-validate/node_modules/camelcase/index.jsLow
TODO
1 comment- TODO: Remove this for the next major release
tests/node_modules/jest-worker/build/workers/ChildProcessWorker.jsLow
TODO
2 comments- TODO: Add appropriate type check
- TODO: At some point it would make sense to make use of
tests/node_modules/jest-worker/build/workers/NodeThreadsWorker.jsLow
TODO
1 comment- TODO: At some point it would make sense to make use of
tests/node_modules/js-yaml/dist/js-yaml.jsLow
HACK
2 comments- Quick hack to not allow integers end with `_`
- while YAML requres dot: 5.e-100. Fix it with simple hack
TODO
2 comments- TODO: rework to inline fn with no type cast?
- TODO: Add tag format check.
tests/node_modules/js-yaml/lib/js-yaml/loader.jsLow
TODO
1 comment- TODO: rework to inline fn with no type cast?
tests/node_modules/js-yaml/lib/js-yaml/type.jsLow
TODO
1 comment- TODO: Add tag format check.
tests/node_modules/js-yaml/lib/js-yaml/type/float.jsLow
HACK
2 comments- Quick hack to not allow integers end with `_`
- while YAML requres dot: 5.e-100. Fix it with simple hack
tests/node_modules/jsdom/lib/api.jsLow
TODO
1 comment- TODO NEWAPI move _cookieJar to window probably
tests/node_modules/jsdom/lib/jsdom/browser/Window.jsLow
TODO
3 comments- TODO: implement timer nesting level behavior.
- TODO: Parse pseudoElt
- ### PUBLIC DATA PROPERTIES (TODO: should be getters)
tests/node_modules/jsdom/lib/jsdom/browser/parser/html.jsLow
TODO
1 comment- TODO: the rest of jsdom ignores this
tests/node_modules/jsdom/lib/jsdom/browser/resources/resource-loader.jsLow
TODO
1 comment- TODO This deviates from the spec when it comes to
tests/node_modules/jsdom/lib/jsdom/level2/style.jsLow
TODO
1 comment- TODO
tests/node_modules/jsdom/lib/jsdom/level3/xpath.jsLow
TODO
17 comments- TODO: not really needed, but supposedly tokenizer also disambiguates
- TODO
- ************************************************************************* Optimizations (TODO) * *************************************************************************
- TODO
- TODO: use optimization. Also try element.getElementsByTagName
- TODO: figure out whether positions should be undefined here.
- TODO: with namespace
- TODO: I think this check is unnecessary
- TODO
- TODO: namespaced version
- TODO
- TODO
- TODO: don't generate '/' nodes, just Axis nodes.
- TODO: give option
- TODO: is copy needed?
- TODO
- TODO: we removed mutation events but didn't take care of this. No tests fail, so that's nice, but eventually we
tests/node_modules/jsdom/lib/jsdom/living/domparsing/DOMParser-impl.jsLow
TODO
1 comment- TODO: somehow set URL to active document's URL
tests/node_modules/jsdom/lib/jsdom/living/helpers/create-event-accessor.jsLow
TODO
2 comments- TODO: we don't implement BeforeUnloadEvent so we can't brand-check here
- TODO: Consider replacing this with `[ReflectEvent]`
tests/node_modules/jsdom/lib/jsdom/living/helpers/form-controls.jsLow
TODO
3 comments- TODO: using parseFloatingPointNumber in addition to isValidFloatingPointNumber to pass number.html WPT.
- TODO: using parseFloatingPointNumber in addition to isValidFloatingPointNumber to pass number.html WPT.
- TODO: The spec describes an imperative process for assigning/resetting an element's form
tests/node_modules/jsdom/lib/jsdom/living/helpers/http-request.jsLow
TODO
1 comment- TODO: investigate this further and ideally remove
tests/node_modules/jsdom/lib/jsdom/living/helpers/internal-constants.jsLow
TODO
1 comment- TODO: the many underscore-prefixed hooks should move here
tests/node_modules/jsdom/lib/jsdom/living/helpers/shadow-dom.jsLow
TODO
1 comment- user-visible global scope with a _getTheParent value. TODO: remove this entire function and use _getTheParent
tests/node_modules/jsdom/lib/jsdom/living/helpers/stylesheets.jsLow
TODO
5 comments- TODO: this should really implement https://html.spec.whatwg.org/multipage/links.html#link-type-stylesheet
- TODO: "Set the CSS style sheet’s parent CSS style sheet, owner node and owner CSS rule to null."
- TODO: title and disabled stuff
- TODO: MIME type checking?
- TODO this is actually really messed up and overwrites the sheet on elementImpl
tests/node_modules/jsdom/lib/jsdom/living/mutation-observer/MutationObserver-impl.jsLow
TODO
1 comment- TODO: revisit if https://github.com/jsdom/webidl2js/pull/108 gets fixed.
tests/node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.jsLow
HACK
1 comment- hack for script execution
TODO
1 comment- TODO: each style and link element should register its sheet on creation
tests/node_modules/jsdom/lib/jsdom/living/nodes/HTMLHyperlinkElementUtils-impl.jsLow
TODO
3 comments- TODO: Correctly check if the document is fully active
- TODO: Create new browsing context, handle noopener
- TODO: Handle hyperlink suffix and referrerpolicy
tests/node_modules/jsdom/lib/jsdom/living/nodes/HTMLImageElement-impl.jsLow
TODO
1 comment- TODO: handle crossorigin
tests/node_modules/jsdom/lib/jsdom/living/nodes/HTMLLinkElement-impl.jsLow
TODO
3 comments- TODO crossorigin="" or type=""
- TODO: refactor into general link-fetching like the spec.
- TODO handle crossorigin="", nonce, integrity="", referrerpolicy=""
tests/node_modules/jsdom/lib/jsdom/living/nodes/HTMLOrSVGElement-impl.jsLow
TODO
1 comment- TODO this should be [Reflect]able if we added default value support to webidl2js's [Reflect]
tests/node_modules/jsdom/lib/jsdom/living/nodes/HTMLScriptElement-impl.jsLow
HACK
1 comment- In our current terribly-hacky document.write() implementation, we parse in a div them move elements into the main
TODO
3 comments- TODO: this text check doesn't seem completely the same as the spec, which e.g. will try to execute scripts with
- TODO: implement modules, and then change the check to `type === null`.
- TODO: implement nomodule here, **but only after we support modules**.
tests/node_modules/jsdom/lib/jsdom/living/nodes/SVGElement-impl.jsLow
TODO
1 comment- TODO: <symbol>/<use> may make this different from ownerSVGElement.
tests/node_modules/jsdom/lib/jsdom/living/nodes/SVGSVGElement-impl.jsLow
TODO
1 comment- TODO: optimize with _ids caching trick; see Document class.
tests/node_modules/jsdom/lib/jsdom/living/post-message.jsLow
TODO
6 comments- TODO: Fix me
- TODO: targetOrigin === '/' - requires reference to source window
- TODO: event.source - requires reference to source window
- TODO: event.origin - requires reference to source window
- TODO: event.ports
- TODO: event.data - structured clone message - requires cloning DOM nodes
tests/node_modules/jsdom/lib/jsdom/living/selection/Selection-impl.jsLow
TODO
1 comment- TODO: Emit "selectionchange" event. At this time, there is currently no test in WPT covering this.
tests/node_modules/jsdom/lib/jsdom/living/svg/SVGListBase.jsLow
TODO
5 comments- TODO: support non-DOMString lists.
- TODO: clone non-DOMString list elements.
- TODO: clone non-DOMString list elements.
- TODO: clone non-DOMString list elements.
- TODO: clone non-DOMString list elements.
tests/node_modules/jsdom/lib/jsdom/living/window/History-impl.jsLow
TODO
3 comments- TODO structured clone data
- TODO: If the current entry in the session history represents a non-GET request
- TODO clone again!! O_o
tests/node_modules/jsdom/lib/jsdom/living/window/SessionHistory.jsLow
TODO
2 comments- TODO: unload the active document with the recycle parameter set to false
- TODO structured clone
tests/node_modules/jsdom/lib/jsdom/living/xhr/FormData-impl.jsLow
TODO
5 comments- TODO: handle encoding
- TODO: handling "constructing entry list"
- TODO: Handle <input type="image">
- TODO: handle form-associated custom elements.
- TODO: formdata event
tests/node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.jsLow
TODO
1 comment- TODO: Add support for URLSearchParams and ReadableStream
tests/node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequestEventTarget-impl.jsLow
TODO
1 comment- TODO: remove this when we fix EventTargetImpl to use this._globalObject directly instead of using _ownerDocument.
tests/node_modules/jsdom/lib/jsdom/living/xhr/xhr-utils.jsLow
TODO
2 comments- TODO this should become "resource loading" when XHR goes through resource loader
- TODO: implement https://html.spec.whatwg.org/#multipart-form-data
tests/node_modules/jsdom/lib/jsdom/utils.jsLow
TODO
1 comment- TODO: remove once Node v16 is the minimum version.
tests/node_modules/jsdom/lib/jsdom/vm-shim.jsLow
TODO
1 comment- TODO: This should probably use a symbol
tests/node_modules/leven/index.d.tsLow
TODO
1 comment- TODO: Remove this for the next major release, refactor the whole definition to:
tests/node_modules/leven/index.jsLow
TODO
1 comment- TODO: Remove this for the next major release
tests/node_modules/make-dir/node_modules/semver/classes/range.jsLow
TODO
1 comment- TODO build?
tests/node_modules/make-dir/node_modules/semver/preload.jsLow
XXX
1 comment- XXX remove in v8 or beyond
tests/node_modules/mime-types/index.jsLow
TODO
4 comments- TODO: use media-typer
- TODO: should this even be in this module?
- TODO: use content-type or other module
- TODO: use media-typer
tests/node_modules/mimic-fn/index.d.tsLow
TODO
1 comment- TODO: Remove this for the next major release, refactor the whole definition to:
tests/node_modules/mimic-fn/index.jsLow
TODO
1 comment- TODO: Remove this for the next major release
tests/node_modules/minimatch/minimatch.jsLow
HACK
1 comment- Hack to work around lack of negative lookbehind in JS
TODO
1 comment- TODO: It would probably be faster to determine this
XXX
1 comment- XXX remove this slice. Just pass the start index.
tests/node_modules/npm-run-path/index.d.tsLow
TODO
1 comment- TODO: Remove this for the next major release
tests/node_modules/npm-run-path/index.jsLow
TODO
1 comment- TODO: Remove this for the next major release
tests/node_modules/nwsapi/src/modules/nwsapi-traversal.jsLow
TODO
1 comment- TODO: all of this needs tests
tests/node_modules/onetime/index.d.tsLow
TODO
1 comment- TODO: Remove this for the next major release
tests/node_modules/onetime/index.jsLow
TODO
1 comment- TODO: Remove this for the next major release
tests/node_modules/p-locate/index.d.tsLow
TODO
1 comment- TODO: Remove this for the next major release, refactor the whole definition to:
tests/node_modules/p-locate/index.jsLow
TODO
1 comment- TODO: Remove this for the next major release
tests/node_modules/p-try/index.d.tsLow
TODO
1 comment- TODO: remove this in the next major version, refactor the whole definition to:
tests/node_modules/p-try/index.jsLow
TODO
1 comment- TODO: remove this in the next major version
tests/node_modules/path-key/index.d.tsLow
TODO
1 comment- TODO: Remove this for the next major release, refactor the whole definition to:
tests/node_modules/path-key/index.jsLow
TODO
1 comment- TODO: Remove this for the next major release
tests/node_modules/pkg-dir/index.d.tsLow
TODO
1 comment- TODO: Remove this for the next major release
tests/node_modules/pkg-dir/index.jsLow
TODO
1 comment- TODO: Remove this for the next major release
tests/node_modules/prompts/dist/elements/date.jsLow
TODO
2 comments- Day // TODO
- AM/PM // TODO (special)
tests/node_modules/prompts/dist/util/action.jsLow
TODO
2 comments- TODO create home() in prompt types (e.g. TextPrompt)
- TODO create end() in prompt types (e.g. TextPrompt)
tests/node_modules/prompts/lib/elements/date.jsLow
TODO
2 comments- Day // TODO
- AM/PM // TODO (special)
tests/node_modules/prompts/lib/util/action.jsLow
TODO
2 comments- TODO create home() in prompt types (e.g. TextPrompt)
- TODO create end() in prompt types (e.g. TextPrompt)
tests/node_modules/psl/index.jsLow
TODO
1 comment- TODO: Simply remove trailing dot?
tests/node_modules/source-map/dist/source-map.debug.jsLow
XXX
1 comment- XXX: file:// URIs and absolute paths lead to unexpected behavior for
tests/node_modules/source-map/dist/source-map.jsLow
XXX
1 comment- XXX: file:// URIs and absolute paths lead to unexpected behavior for
tests/node_modules/source-map/lib/source-map-consumer.jsLow
XXX
1 comment- XXX: file:// URIs and absolute paths lead to unexpected behavior for
tests/node_modules/string-width/index.d.tsLow
TODO
1 comment- TODO: remove this in the next major version, refactor the whole definition to:
tests/node_modules/string-width/index.jsLow
TODO
1 comment- TODO: remove this in the next major version
tests/node_modules/tr46/index.jsLow
TODO
1 comment- TODO: make this more efficient
tests/node_modules/type-fest/source/basic.d.tsLow
TODO
2 comments- TODO: This can just be `export type Primitive = not object` when the `not` keyword is out.
- TODO: Remove the `= unknown` sometime in the future when most users are on TS 3.5 as it's now the default
tests/node_modules/type-fest/source/require-exactly-one.d.tsLow
TODO
1 comment- TODO: Remove this when we target TypeScript >=3.5.
tests/node_modules/undici-types/cache-interceptor.d.tsLow
TODO
1 comment- TODO docs @default 'shared'
tests/node_modules/undici-types/client.d.tsLow
TODO
8 comments- TODO
- TODO
- TODO
- TODO
- TODO
- TODO
- TODO
- TODO
tests/node_modules/undici-types/h2c-client.d.tsLow
TODO
7 comments- TODO
- TODO
- TODO
- TODO
- TODO
- TODO
- TODO
tests/node_modules/undici-types/webidl.d.tsLow
TODO
1 comment- TODO(@KhafraDev): a type could likely be implemented that can infer the return type
tests/node_modules/v8-to-istanbul/lib/v8-to-istanbul.jsLow
TODO
3 comments- TODO: investigate whether there's ever a case where we hit this logic with 1:many sources.
- TODO: investigate whether there's ever a case where we hit this logic with 1:many sources.
- TODO: could we move the resolving logic for 1:1 source maps to the final
tests/node_modules/w3c-xmlserializer/lib/attributes.jsLow
TODO
1 comment- TODO: Check well-formedness
tests/node_modules/whatwg-url/lib/URL-impl.jsLow
HACK
1 comment- question mark by default. Therefore the doNotStripQMark hack is used.
tests/node_modules/whatwg-url/lib/percent-encoding.jsLow
TODO
1 comment- Assuming encoding is always utf-8 allows us to trim one of the logic branches. TODO: support encoding.
tests/node_modules/whatwg-url/lib/url-state-machine.jsLow
TODO
4 comments- TODO: If c is not a URL code point and not "%", parse error.
- TODO: Add: not a URL code point
- TODO: If c is not a URL code point and not "%", parse error.
- TODO: If c is not a URL code point and not "%", parse error.
tests/node_modules/whatwg-url/lib/urlencoded.jsLow
TODO
2 comments- TODO "get the output encoding", i.e. handle encoding labels vs. names.
- TODO: handle encoding override
tests/node_modules/ws/lib/validation.jsLow
XXX
4 comments- 0xxxxxxx
- 110xxxxx 10xxxxxx
- 1110xxxx 10xxxxxx 10xxxxxx
- 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
tests/node_modules/yargs-parser/browser.jsLow
TODO
1 comment- TODO: figure out reasonable web equivalents for "resolve", "normalize", etc.
tests/node_modules/yargs-parser/build/lib/index.jsLow
TODO
1 comment- TODO: figure out a way to combine ESM and CJS coverage, such that
tests/node_modules/yargs-parser/build/lib/yargs-parser.jsLow
TODO
4 comments- TODO(bcoe): for the first pass at removing object prototype we didn't
- TODO(bcoe): in the next major version of yargs, switch to
- TODO(bcoe): in the next major version of yargs, switch to
- TODO(bcoe): in the next major version of yargs, switch to
tests/node_modules/yargs/lib/platform-shims/browser.mjsLow
TODO
1 comment- TODO: replace this with y18n once it's ported to ESM:
tests/node_modules/yargs/yargs.mjsLow
TODO
1 comment- TODO: consolidate on using a helpers file at some point in the future, which
tests/node_modules/yocto-queue/index.jsLow
TODO
2 comments- TODO: Remove this when targeting Node.js 12.
- TODO: Use private class fields when targeting Node.js 12.
Minify shipped HTML
Total byte savings2.6 KBMinify shipped SVG
Total byte savings97 BSourcemap Comment Leaks
Duplicate Contents
- Duplicate groups
- 3
- Evidence types
- 4
Asset duplicates
- Groups
- 2
- Duplicate Byte Cost
- 721 B
SECTION 04
Image Optimization Findings
2 image assets, 721 B recoverable.
Review image assets ranked by recoverable bytes. Open a row for usage evidence, preview, and the target change.
- Assets
- 2
- Recoverable Bytes
- 721 B
No matching image findings. Try another filter or search.
Regulatory Risk Signals
Static risk signals across applicable regulatory frameworks. Investigate matches; absence does not certify compliance.
- Total Signals
- 0
- Subprocessors
- 0
- Data flows
- 0
- Jurisdictions
- 0
The report did not find static regulatory signals in the current analyzer output. Absence does not certify compliance.
No GDPR signals found
No ePrivacy signals found
No UK GDPR signals found
No PECR signals found
No DSA signals found
No AI Act signals found
No CCPA/CPRA signals found
No COPPA signals found
No HIPAA signals found
No BIPA signals found
No TDPSA signals found
No WA MHMDA signals found
No Wiretap signals found
No Other signals found
tests/node_modules/@ampproject/remapping/dist/remapping.mjs→remapping.mjs.maptests/node_modules/@ampproject/remapping/dist/remapping.umd.js→remapping.umd.js.maptests/node_modules/@babel/code-frame/lib/index.js→index.js.maptests/node_modules/@babel/core/lib/config/cache-contexts.js→cache-contexts.js.maptests/node_modules/@babel/core/lib/config/caching.js→caching.js.maptests/node_modules/@babel/core/lib/config/config-chain.js→config-chain.js.maptests/node_modules/@babel/core/lib/config/config-descriptors.js→config-descriptors.js.maptests/node_modules/@babel/core/lib/config/files/configuration.js→configuration.js.maptests/node_modules/@babel/core/lib/config/files/index-browser.js→index-browser.js.maptests/node_modules/@babel/core/lib/config/files/index.js→index.js.maptests/node_modules/@babel/core/lib/config/files/module-types.js→module-types.js.maptests/node_modules/@babel/core/lib/config/files/package.js→package.js.maptests/node_modules/@babel/core/lib/config/files/plugins.js→plugins.js.maptests/node_modules/@babel/core/lib/config/files/types.js→types.js.maptests/node_modules/@babel/core/lib/config/files/utils.js→utils.js.maptests/node_modules/@babel/core/lib/config/full.js→full.js.maptests/node_modules/@babel/core/lib/config/helpers/config-api.js→config-api.js.maptests/node_modules/@babel/core/lib/config/helpers/deep-array.js→deep-array.js.maptests/node_modules/@babel/core/lib/config/helpers/environment.js→environment.js.maptests/node_modules/@babel/core/lib/config/index.js→index.js.maptests/node_modules/@babel/core/lib/config/item.js→item.js.maptests/node_modules/@babel/core/lib/config/partial.js→partial.js.maptests/node_modules/@babel/core/lib/config/pattern-to-regex.js→pattern-to-regex.js.maptests/node_modules/@babel/core/lib/config/plugin.js→plugin.js.maptests/node_modules/@babel/core/lib/config/printer.js→printer.js.maptests/node_modules/@babel/core/lib/config/resolve-targets-browser.js→resolve-targets-browser.js.maptests/node_modules/@babel/core/lib/config/resolve-targets.js→resolve-targets.js.maptests/node_modules/@babel/core/lib/config/util.js→util.js.maptests/node_modules/@babel/core/lib/config/validation/option-assertions.js→option-assertions.js.maptests/node_modules/@babel/core/lib/config/validation/options.js→options.js.maptests/node_modules/@babel/core/lib/config/validation/plugins.js→plugins.js.maptests/node_modules/@babel/core/lib/config/validation/removed.js→removed.js.maptests/node_modules/@babel/core/lib/errors/config-error.js→config-error.js.maptests/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js→rewrite-stack-trace.js.maptests/node_modules/@babel/core/lib/gensync-utils/async.js→async.js.maptests/node_modules/@babel/core/lib/gensync-utils/fs.js→fs.js.maptests/node_modules/@babel/core/lib/gensync-utils/functional.js→functional.js.maptests/node_modules/@babel/core/lib/index.js→index.js.maptests/node_modules/@babel/core/lib/parse.js→parse.js.maptests/node_modules/@babel/core/lib/parser/index.js→index.js.maptests/node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js→missing-plugin-helper.js.maptests/node_modules/@babel/core/lib/tools/build-external-helpers.js→build-external-helpers.js.maptests/node_modules/@babel/core/lib/transform-ast.js→transform-ast.js.maptests/node_modules/@babel/core/lib/transform-file-browser.js→transform-file-browser.js.maptests/node_modules/@babel/core/lib/transform-file.js→transform-file.js.maptests/node_modules/@babel/core/lib/transform.js→transform.js.maptests/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js→block-hoist-plugin.js.maptests/node_modules/@babel/core/lib/transformation/file/file.js→file.js.maptests/node_modules/@babel/core/lib/transformation/file/generate.js→generate.js.maptests/node_modules/@babel/core/lib/transformation/file/merge-map.js→merge-map.js.maptests/node_modules/@babel/core/lib/transformation/index.js→index.js.maptests/node_modules/@babel/core/lib/transformation/normalize-file.js→normalize-file.js.maptests/node_modules/@babel/core/lib/transformation/normalize-opts.js→normalize-opts.js.maptests/node_modules/@babel/core/lib/transformation/plugin-pass.js→plugin-pass.js.maptests/node_modules/@babel/core/lib/transformation/util/clone-deep.js→clone-deep.js.maptests/node_modules/@babel/core/lib/vendor/import-meta-resolve.js→import-meta-resolve.js.maptests/node_modules/@babel/generator/lib/buffer.js→buffer.js.maptests/node_modules/@babel/generator/lib/generators/base.js→base.js.maptests/node_modules/@babel/generator/lib/generators/classes.js→classes.js.maptests/node_modules/@babel/generator/lib/generators/deprecated.js→deprecated.js.maptests/node_modules/@babel/generator/lib/generators/expressions.js→expressions.js.maptests/node_modules/@babel/generator/lib/generators/flow.js→flow.js.maptests/node_modules/@babel/generator/lib/generators/index.js→index.js.maptests/node_modules/@babel/generator/lib/generators/jsx.js→jsx.js.maptests/node_modules/@babel/generator/lib/generators/methods.js→methods.js.maptests/node_modules/@babel/generator/lib/generators/modules.js→modules.js.maptests/node_modules/@babel/generator/lib/generators/statements.js→statements.js.maptests/node_modules/@babel/generator/lib/generators/template-literals.js→template-literals.js.maptests/node_modules/@babel/generator/lib/generators/types.js→types.js.maptests/node_modules/@babel/generator/lib/generators/typescript.js→typescript.js.maptests/node_modules/@babel/generator/lib/index.js→index.js.maptests/node_modules/@babel/generator/lib/node/index.js→index.js.maptests/node_modules/@babel/generator/lib/node/parentheses.js→parentheses.js.maptests/node_modules/@babel/generator/lib/node/whitespace.js→whitespace.js.maptests/node_modules/@babel/generator/lib/printer.js→printer.js.maptests/node_modules/@babel/generator/lib/source-map.js→source-map.js.maptests/node_modules/@babel/generator/lib/token-map.js→token-map.js.maptests/node_modules/@babel/helper-compilation-targets/lib/debug.js→debug.js.maptests/node_modules/@babel/helper-compilation-targets/lib/filter-items.js→filter-items.js.maptests/node_modules/@babel/helper-compilation-targets/lib/index.js→index.js.maptests/node_modules/@babel/helper-compilation-targets/lib/options.js→options.js.maptests/node_modules/@babel/helper-compilation-targets/lib/pretty.js→pretty.js.maptests/node_modules/@babel/helper-compilation-targets/lib/targets.js→targets.js.maptests/node_modules/@babel/helper-compilation-targets/lib/utils.js→utils.js.maptests/node_modules/@babel/helper-module-imports/lib/import-builder.js→import-builder.js.maptests/node_modules/@babel/helper-module-imports/lib/import-injector.js→import-injector.js.maptests/node_modules/@babel/helper-module-imports/lib/index.js→index.js.maptests/node_modules/@babel/helper-module-imports/lib/is-module.js→is-module.js.maptests/node_modules/@babel/helper-module-transforms/lib/dynamic-import.js→dynamic-import.js.maptests/node_modules/@babel/helper-module-transforms/lib/get-module-name.js→get-module-name.js.maptests/node_modules/@babel/helper-module-transforms/lib/index.js→index.js.maptests/node_modules/@babel/helper-module-transforms/lib/lazy-modules.js→lazy-modules.js.maptests/node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js→normalize-and-load-metadata.js.maptests/node_modules/@babel/helper-module-transforms/lib/rewrite-live-references.js→rewrite-live-references.js.maptests/node_modules/@babel/helper-module-transforms/lib/rewrite-this.js→rewrite-this.js.maptests/node_modules/@babel/helper-plugin-utils/lib/index.js→index.js.maptests/node_modules/@babel/helper-string-parser/lib/index.js→index.js.maptests/node_modules/@babel/helper-validator-identifier/lib/identifier.js→identifier.js.maptests/node_modules/@babel/helper-validator-identifier/lib/index.js→index.js.maptests/node_modules/@babel/helper-validator-identifier/lib/keyword.js→keyword.js.maptests/node_modules/@babel/helper-validator-option/lib/find-suggestion.js→find-suggestion.js.maptests/node_modules/@babel/helper-validator-option/lib/index.js→index.js.maptests/node_modules/@babel/helper-validator-option/lib/validator.js→validator.js.maptests/node_modules/@babel/helpers/lib/helpers-generated.js→helpers-generated.js.maptests/node_modules/@babel/helpers/lib/helpers/AwaitValue.js→AwaitValue.js.maptests/node_modules/@babel/helpers/lib/helpers/OverloadYield.js→OverloadYield.js.maptests/node_modules/@babel/helpers/lib/helpers/applyDecoratedDescriptor.js→applyDecoratedDescriptor.js.maptests/node_modules/@babel/helpers/lib/helpers/applyDecs.js→applyDecs.js.maptests/node_modules/@babel/helpers/lib/helpers/applyDecs2203.js→applyDecs2203.js.maptests/node_modules/@babel/helpers/lib/helpers/applyDecs2203R.js→applyDecs2203R.js.maptests/node_modules/@babel/helpers/lib/helpers/applyDecs2301.js→applyDecs2301.js.maptests/node_modules/@babel/helpers/lib/helpers/applyDecs2305.js→applyDecs2305.js.maptests/node_modules/@babel/helpers/lib/helpers/applyDecs2311.js→applyDecs2311.js.maptests/node_modules/@babel/helpers/lib/helpers/arrayLikeToArray.js→arrayLikeToArray.js.maptests/node_modules/@babel/helpers/lib/helpers/arrayWithHoles.js→arrayWithHoles.js.maptests/node_modules/@babel/helpers/lib/helpers/arrayWithoutHoles.js→arrayWithoutHoles.js.maptests/node_modules/@babel/helpers/lib/helpers/assertClassBrand.js→assertClassBrand.js.maptests/node_modules/@babel/helpers/lib/helpers/assertThisInitialized.js→assertThisInitialized.js.maptests/node_modules/@babel/helpers/lib/helpers/asyncGeneratorDelegate.js→asyncGeneratorDelegate.js.maptests/node_modules/@babel/helpers/lib/helpers/asyncIterator.js→asyncIterator.js.maptests/node_modules/@babel/helpers/lib/helpers/asyncToGenerator.js→asyncToGenerator.js.maptests/node_modules/@babel/helpers/lib/helpers/awaitAsyncGenerator.js→awaitAsyncGenerator.js.maptests/node_modules/@babel/helpers/lib/helpers/callSuper.js→callSuper.js.maptests/node_modules/@babel/helpers/lib/helpers/checkInRHS.js→checkInRHS.js.maptests/node_modules/@babel/helpers/lib/helpers/checkPrivateRedeclaration.js→checkPrivateRedeclaration.js.maptests/node_modules/@babel/helpers/lib/helpers/classApplyDescriptorDestructureSet.js→classApplyDescriptorDestructureSet.js.maptests/node_modules/@babel/helpers/lib/helpers/classApplyDescriptorGet.js→classApplyDescriptorGet.js.maptests/node_modules/@babel/helpers/lib/helpers/classApplyDescriptorSet.js→classApplyDescriptorSet.js.maptests/node_modules/@babel/helpers/lib/helpers/classCallCheck.js→classCallCheck.js.maptests/node_modules/@babel/helpers/lib/helpers/classCheckPrivateStaticAccess.js→classCheckPrivateStaticAccess.js.maptests/node_modules/@babel/helpers/lib/helpers/classCheckPrivateStaticFieldDescriptor.js→classCheckPrivateStaticFieldDescriptor.js.maptests/node_modules/@babel/helpers/lib/helpers/classExtractFieldDescriptor.js→classExtractFieldDescriptor.js.maptests/node_modules/@babel/helpers/lib/helpers/classNameTDZError.js→classNameTDZError.js.maptests/node_modules/@babel/helpers/lib/helpers/classPrivateFieldDestructureSet.js→classPrivateFieldDestructureSet.js.maptests/node_modules/@babel/helpers/lib/helpers/classPrivateFieldGet.js→classPrivateFieldGet.js.maptests/node_modules/@babel/helpers/lib/helpers/classPrivateFieldGet2.js→classPrivateFieldGet2.js.maptests/node_modules/@babel/helpers/lib/helpers/classPrivateFieldInitSpec.js→classPrivateFieldInitSpec.js.maptests/node_modules/@babel/helpers/lib/helpers/classPrivateFieldLooseBase.js→classPrivateFieldLooseBase.js.maptests/node_modules/@babel/helpers/lib/helpers/classPrivateFieldLooseKey.js→classPrivateFieldLooseKey.js.maptests/node_modules/@babel/helpers/lib/helpers/classPrivateFieldSet.js→classPrivateFieldSet.js.maptests/node_modules/@babel/helpers/lib/helpers/classPrivateFieldSet2.js→classPrivateFieldSet2.js.maptests/node_modules/@babel/helpers/lib/helpers/classPrivateGetter.js→classPrivateGetter.js.maptests/node_modules/@babel/helpers/lib/helpers/classPrivateMethodGet.js→classPrivateMethodGet.js.maptests/node_modules/@babel/helpers/lib/helpers/classPrivateMethodInitSpec.js→classPrivateMethodInitSpec.js.maptests/node_modules/@babel/helpers/lib/helpers/classPrivateMethodSet.js→classPrivateMethodSet.js.maptests/node_modules/@babel/helpers/lib/helpers/classPrivateSetter.js→classPrivateSetter.js.maptests/node_modules/@babel/helpers/lib/helpers/classStaticPrivateFieldDestructureSet.js→classStaticPrivateFieldDestructureSet.js.maptests/node_modules/@babel/helpers/lib/helpers/classStaticPrivateFieldSpecGet.js→classStaticPrivateFieldSpecGet.js.maptests/node_modules/@babel/helpers/lib/helpers/classStaticPrivateFieldSpecSet.js→classStaticPrivateFieldSpecSet.js.maptests/node_modules/@babel/helpers/lib/helpers/classStaticPrivateMethodGet.js→classStaticPrivateMethodGet.js.maptests/node_modules/@babel/helpers/lib/helpers/classStaticPrivateMethodSet.js→classStaticPrivateMethodSet.js.maptests/node_modules/@babel/helpers/lib/helpers/construct.js→construct.js.maptests/node_modules/@babel/helpers/lib/helpers/createClass.js→createClass.js.maptests/node_modules/@babel/helpers/lib/helpers/createForOfIteratorHelper.js→createForOfIteratorHelper.js.maptests/node_modules/@babel/helpers/lib/helpers/createForOfIteratorHelperLoose.js→createForOfIteratorHelperLoose.js.maptests/node_modules/@babel/helpers/lib/helpers/createSuper.js→createSuper.js.maptests/node_modules/@babel/helpers/lib/helpers/decorate.js→decorate.js.maptests/node_modules/@babel/helpers/lib/helpers/defaults.js→defaults.js.maptests/node_modules/@babel/helpers/lib/helpers/defineAccessor.js→defineAccessor.js.maptests/node_modules/@babel/helpers/lib/helpers/defineEnumerableProperties.js→defineEnumerableProperties.js.maptests/node_modules/@babel/helpers/lib/helpers/defineProperty.js→defineProperty.js.maptests/node_modules/@babel/helpers/lib/helpers/dispose.js→dispose.js.maptests/node_modules/@babel/helpers/lib/helpers/extends.js→extends.js.maptests/node_modules/@babel/helpers/lib/helpers/get.js→get.js.maptests/node_modules/@babel/helpers/lib/helpers/getPrototypeOf.js→getPrototypeOf.js.maptests/node_modules/@babel/helpers/lib/helpers/identity.js→identity.js.maptests/node_modules/@babel/helpers/lib/helpers/importDeferProxy.js→importDeferProxy.js.maptests/node_modules/@babel/helpers/lib/helpers/inherits.js→inherits.js.maptests/node_modules/@babel/helpers/lib/helpers/inheritsLoose.js→inheritsLoose.js.maptests/node_modules/@babel/helpers/lib/helpers/initializerDefineProperty.js→initializerDefineProperty.js.maptests/node_modules/@babel/helpers/lib/helpers/initializerWarningHelper.js→initializerWarningHelper.js.maptests/node_modules/@babel/helpers/lib/helpers/instanceof.js→instanceof.js.maptests/node_modules/@babel/helpers/lib/helpers/interopRequireDefault.js→interopRequireDefault.js.maptests/node_modules/@babel/helpers/lib/helpers/interopRequireWildcard.js→interopRequireWildcard.js.maptests/node_modules/@babel/helpers/lib/helpers/isNativeFunction.js→isNativeFunction.js.maptests/node_modules/@babel/helpers/lib/helpers/isNativeReflectConstruct.js→isNativeReflectConstruct.js.maptests/node_modules/@babel/helpers/lib/helpers/iterableToArray.js→iterableToArray.js.maptests/node_modules/@babel/helpers/lib/helpers/iterableToArrayLimit.js→iterableToArrayLimit.js.maptests/node_modules/@babel/helpers/lib/helpers/jsx.js→jsx.js.maptests/node_modules/@babel/helpers/lib/helpers/maybeArrayLike.js→maybeArrayLike.js.maptests/node_modules/@babel/helpers/lib/helpers/newArrowCheck.js→newArrowCheck.js.maptests/node_modules/@babel/helpers/lib/helpers/nonIterableRest.js→nonIterableRest.js.maptests/node_modules/@babel/helpers/lib/helpers/nonIterableSpread.js→nonIterableSpread.js.maptests/node_modules/@babel/helpers/lib/helpers/nullishReceiverError.js→nullishReceiverError.js.maptests/node_modules/@babel/helpers/lib/helpers/objectDestructuringEmpty.js→objectDestructuringEmpty.js.maptests/node_modules/@babel/helpers/lib/helpers/objectSpread.js→objectSpread.js.maptests/node_modules/@babel/helpers/lib/helpers/objectSpread2.js→objectSpread2.js.maptests/node_modules/@babel/helpers/lib/helpers/objectWithoutProperties.js→objectWithoutProperties.js.maptests/node_modules/@babel/helpers/lib/helpers/objectWithoutPropertiesLoose.js→objectWithoutPropertiesLoose.js.maptests/node_modules/@babel/helpers/lib/helpers/possibleConstructorReturn.js→possibleConstructorReturn.js.maptests/node_modules/@babel/helpers/lib/helpers/readOnlyError.js→readOnlyError.js.maptests/node_modules/@babel/helpers/lib/helpers/regenerator.js→regenerator.js.maptests/node_modules/@babel/helpers/lib/helpers/regeneratorAsync.js→regeneratorAsync.js.maptests/node_modules/@babel/helpers/lib/helpers/regeneratorAsyncGen.js→regeneratorAsyncGen.js.maptests/node_modules/@babel/helpers/lib/helpers/regeneratorAsyncIterator.js→regeneratorAsyncIterator.js.maptests/node_modules/@babel/helpers/lib/helpers/regeneratorDefine.js→regeneratorDefine.js.maptests/node_modules/@babel/helpers/lib/helpers/regeneratorKeys.js→regeneratorKeys.js.maptests/node_modules/@babel/helpers/lib/helpers/regeneratorRuntime.js→regeneratorRuntime.js.maptests/node_modules/@babel/helpers/lib/helpers/regeneratorValues.js→regeneratorValues.js.maptests/node_modules/@babel/helpers/lib/helpers/set.js→set.js.maptests/node_modules/@babel/helpers/lib/helpers/setFunctionName.js→setFunctionName.js.maptests/node_modules/@babel/helpers/lib/helpers/setPrototypeOf.js→setPrototypeOf.js.maptests/node_modules/@babel/helpers/lib/helpers/skipFirstGeneratorNext.js→skipFirstGeneratorNext.js.maptests/node_modules/@babel/helpers/lib/helpers/slicedToArray.js→slicedToArray.js.maptests/node_modules/@babel/helpers/lib/helpers/superPropBase.js→superPropBase.js.maptests/node_modules/@babel/helpers/lib/helpers/superPropGet.js→superPropGet.js.maptests/node_modules/@babel/helpers/lib/helpers/superPropSet.js→superPropSet.js.maptests/node_modules/@babel/helpers/lib/helpers/taggedTemplateLiteral.js→taggedTemplateLiteral.js.maptests/node_modules/@babel/helpers/lib/helpers/taggedTemplateLiteralLoose.js→taggedTemplateLiteralLoose.js.maptests/node_modules/@babel/helpers/lib/helpers/tdz.js→tdz.js.maptests/node_modules/@babel/helpers/lib/helpers/temporalRef.js→temporalRef.js.maptests/node_modules/@babel/helpers/lib/helpers/temporalUndefined.js→temporalUndefined.js.maptests/node_modules/@babel/helpers/lib/helpers/toArray.js→toArray.js.maptests/node_modules/@babel/helpers/lib/helpers/toConsumableArray.js→toConsumableArray.js.maptests/node_modules/@babel/helpers/lib/helpers/toPrimitive.js→toPrimitive.js.maptests/node_modules/@babel/helpers/lib/helpers/toPropertyKey.js→toPropertyKey.js.maptests/node_modules/@babel/helpers/lib/helpers/toSetter.js→toSetter.js.maptests/node_modules/@babel/helpers/lib/helpers/tsRewriteRelativeImportExtensions.js→tsRewriteRelativeImportExtensions.js.maptests/node_modules/@babel/helpers/lib/helpers/typeof.js→typeof.js.maptests/node_modules/@babel/helpers/lib/helpers/unsupportedIterableToArray.js→unsupportedIterableToArray.js.maptests/node_modules/@babel/helpers/lib/helpers/using.js→using.js.maptests/node_modules/@babel/helpers/lib/helpers/usingCtx.js→usingCtx.js.maptests/node_modules/@babel/helpers/lib/helpers/wrapAsyncGenerator.js→wrapAsyncGenerator.js.maptests/node_modules/@babel/helpers/lib/helpers/wrapNativeSuper.js→wrapNativeSuper.js.maptests/node_modules/@babel/helpers/lib/helpers/wrapRegExp.js→wrapRegExp.js.maptests/node_modules/@babel/helpers/lib/helpers/writeOnlyError.js→writeOnlyError.js.maptests/node_modules/@babel/helpers/lib/index.js→index.js.maptests/node_modules/@babel/parser/lib/index.js→index.js.maptests/node_modules/@babel/plugin-syntax-import-attributes/lib/index.js→index.js.maptests/node_modules/@babel/plugin-syntax-jsx/lib/index.js→index.js.maptests/node_modules/@babel/plugin-syntax-typescript/lib/index.js→index.js.maptests/node_modules/@babel/template/lib/builder.js→builder.js.maptests/node_modules/@babel/template/lib/formatters.js→formatters.js.maptests/node_modules/@babel/template/lib/index.js→index.js.maptests/node_modules/@babel/template/lib/literal.js→literal.js.maptests/node_modules/@babel/template/lib/options.js→options.js.maptests/node_modules/@babel/template/lib/parse.js→parse.js.maptests/node_modules/@babel/template/lib/populate.js→populate.js.maptests/node_modules/@babel/template/lib/string.js→string.js.maptests/node_modules/@babel/traverse/lib/cache.js→cache.js.maptests/node_modules/@babel/traverse/lib/context.js→context.js.maptests/node_modules/@babel/traverse/lib/hub.js→hub.js.maptests/node_modules/@babel/traverse/lib/index.js→index.js.maptests/node_modules/@babel/traverse/lib/path/ancestry.js→ancestry.js.maptests/node_modules/@babel/traverse/lib/path/comments.js→comments.js.maptests/node_modules/@babel/traverse/lib/path/context.js→context.js.maptests/node_modules/@babel/traverse/lib/path/conversion.js→conversion.js.maptests/node_modules/@babel/traverse/lib/path/evaluation.js→evaluation.js.maptests/node_modules/@babel/traverse/lib/path/family.js→family.js.maptests/node_modules/@babel/traverse/lib/path/index.js→index.js.maptests/node_modules/@babel/traverse/lib/path/inference/index.js→index.js.maptests/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js→inferer-reference.js.maptests/node_modules/@babel/traverse/lib/path/inference/inferers.js→inferers.js.maptests/node_modules/@babel/traverse/lib/path/inference/util.js→util.js.maptests/node_modules/@babel/traverse/lib/path/introspection.js→introspection.js.maptests/node_modules/@babel/traverse/lib/path/lib/hoister.js→hoister.js.maptests/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js→removal-hooks.js.maptests/node_modules/@babel/traverse/lib/path/lib/virtual-types-validator.js→virtual-types-validator.js.maptests/node_modules/@babel/traverse/lib/path/lib/virtual-types.js→virtual-types.js.maptests/node_modules/@babel/traverse/lib/path/modification.js→modification.js.maptests/node_modules/@babel/traverse/lib/path/removal.js→removal.js.maptests/node_modules/@babel/traverse/lib/path/replacement.js→replacement.js.maptests/node_modules/@babel/traverse/lib/scope/binding.js→binding.js.maptests/node_modules/@babel/traverse/lib/scope/index.js→index.js.maptests/node_modules/@babel/traverse/lib/scope/lib/renamer.js→renamer.js.maptests/node_modules/@babel/traverse/lib/traverse-node.js→traverse-node.js.maptests/node_modules/@babel/traverse/lib/types.js→types.js.maptests/node_modules/@babel/traverse/lib/visitors.js→visitors.js.maptests/node_modules/@babel/types/lib/asserts/assertNode.js→assertNode.js.maptests/node_modules/@babel/types/lib/asserts/generated/index.js→index.js.maptests/node_modules/@babel/types/lib/ast-types/generated/index.js→index.js.maptests/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js→createFlowUnionType.js.maptests/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js→createTypeAnnotationBasedOnTypeof.js.maptests/node_modules/@babel/types/lib/builders/generated/index.js→index.js.maptests/node_modules/@babel/types/lib/builders/generated/lowercase.js→lowercase.js.maptests/node_modules/@babel/types/lib/builders/generated/uppercase.js→uppercase.js.maptests/node_modules/@babel/types/lib/builders/productions.js→productions.js.maptests/node_modules/@babel/types/lib/builders/react/buildChildren.js→buildChildren.js.maptests/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js→createTSUnionType.js.maptests/node_modules/@babel/types/lib/builders/validateNode.js→validateNode.js.maptests/node_modules/@babel/types/lib/clone/clone.js→clone.js.maptests/node_modules/@babel/types/lib/clone/cloneDeep.js→cloneDeep.js.maptests/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js→cloneDeepWithoutLoc.js.maptests/node_modules/@babel/types/lib/clone/cloneNode.js→cloneNode.js.maptests/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js→cloneWithoutLoc.js.maptests/node_modules/@babel/types/lib/comments/addComment.js→addComment.js.maptests/node_modules/@babel/types/lib/comments/addComments.js→addComments.js.maptests/node_modules/@babel/types/lib/comments/inheritInnerComments.js→inheritInnerComments.js.maptests/node_modules/@babel/types/lib/comments/inheritLeadingComments.js→inheritLeadingComments.js.maptests/node_modules/@babel/types/lib/comments/inheritTrailingComments.js→inheritTrailingComments.js.maptests/node_modules/@babel/types/lib/comments/inheritsComments.js→inheritsComments.js.maptests/node_modules/@babel/types/lib/comments/removeComments.js→removeComments.js.maptests/node_modules/@babel/types/lib/constants/generated/index.js→index.js.maptests/node_modules/@babel/types/lib/constants/index.js→index.js.maptests/node_modules/@babel/types/lib/converters/ensureBlock.js→ensureBlock.js.maptests/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js→gatherSequenceExpressions.js.maptests/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js→toBindingIdentifierName.js.maptests/node_modules/@babel/types/lib/converters/toBlock.js→toBlock.js.maptests/node_modules/@babel/types/lib/converters/toComputedKey.js→toComputedKey.js.maptests/node_modules/@babel/types/lib/converters/toExpression.js→toExpression.js.maptests/node_modules/@babel/types/lib/converters/toIdentifier.js→toIdentifier.js.maptests/node_modules/@babel/types/lib/converters/toKeyAlias.js→toKeyAlias.js.maptests/node_modules/@babel/types/lib/converters/toSequenceExpression.js→toSequenceExpression.js.maptests/node_modules/@babel/types/lib/converters/toStatement.js→toStatement.js.maptests/node_modules/@babel/types/lib/converters/valueToNode.js→valueToNode.js.maptests/node_modules/@babel/types/lib/definitions/core.js→core.js.maptests/node_modules/@babel/types/lib/definitions/deprecated-aliases.js→deprecated-aliases.js.maptests/node_modules/@babel/types/lib/definitions/experimental.js→experimental.js.maptests/node_modules/@babel/types/lib/definitions/flow.js→flow.js.maptests/node_modules/@babel/types/lib/definitions/index.js→index.js.maptests/node_modules/@babel/types/lib/definitions/jsx.js→jsx.js.maptests/node_modules/@babel/types/lib/definitions/misc.js→misc.js.maptests/node_modules/@babel/types/lib/definitions/placeholders.js→placeholders.js.maptests/node_modules/@babel/types/lib/definitions/typescript.js→typescript.js.maptests/node_modules/@babel/types/lib/definitions/utils.js→utils.js.maptests/node_modules/@babel/types/lib/index.d.ts→createTypeAnnotationBasedOnTypeof.d.ts.maptests/node_modules/@babel/types/lib/index.d.ts→getBindingIdentifiers.d.ts.maptests/node_modules/@babel/types/lib/index.d.ts→getOuterBindingIdentifiers.d.ts.maptests/node_modules/@babel/types/lib/index.d.ts→index.d.ts.maptests/node_modules/@babel/types/lib/index.d.ts→toExpression.d.ts.maptests/node_modules/@babel/types/lib/index.d.ts→toKeyAlias.d.ts.maptests/node_modules/@babel/types/lib/index.d.ts→toStatement.d.ts.maptests/node_modules/@babel/types/lib/index.d.ts→traverseFast.d.ts.maptests/node_modules/@babel/types/lib/index.d.ts→valueToNode.d.ts.maptests/node_modules/@babel/types/lib/index.js→index.js.maptests/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js→appendToMemberExpression.js.maptests/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js→removeTypeDuplicates.js.maptests/node_modules/@babel/types/lib/modifications/inherits.js→inherits.js.maptests/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js→prependToMemberExpression.js.maptests/node_modules/@babel/types/lib/modifications/removeProperties.js→removeProperties.js.maptests/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js→removePropertiesDeep.js.maptests/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js→removeTypeDuplicates.js.maptests/node_modules/@babel/types/lib/retrievers/getAssignmentIdentifiers.js→getAssignmentIdentifiers.js.maptests/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js→getBindingIdentifiers.js.maptests/node_modules/@babel/types/lib/retrievers/getFunctionName.js→getFunctionName.js.maptests/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js→getOuterBindingIdentifiers.js.maptests/node_modules/@babel/types/lib/traverse/traverse.js→traverse.js.maptests/node_modules/@babel/types/lib/traverse/traverseFast.js→traverseFast.js.maptests/node_modules/@babel/types/lib/utils/deprecationWarning.js→deprecationWarning.js.maptests/node_modules/@babel/types/lib/utils/inherit.js→inherit.js.maptests/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js→cleanJSXElementLiteralChild.js.maptests/node_modules/@babel/types/lib/utils/shallowEqual.js→shallowEqual.js.maptests/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js→buildMatchMemberExpression.js.maptests/node_modules/@babel/types/lib/validators/generated/index.js→index.js.maptests/node_modules/@babel/types/lib/validators/is.js→is.js.maptests/node_modules/@babel/types/lib/validators/isBinding.js→isBinding.js.maptests/node_modules/@babel/types/lib/validators/isBlockScoped.js→isBlockScoped.js.maptests/node_modules/@babel/types/lib/validators/isImmutable.js→isImmutable.js.maptests/node_modules/@babel/types/lib/validators/isLet.js→isLet.js.maptests/node_modules/@babel/types/lib/validators/isNode.js→isNode.js.maptests/node_modules/@babel/types/lib/validators/isNodesEquivalent.js→isNodesEquivalent.js.maptests/node_modules/@babel/types/lib/validators/isPlaceholderType.js→isPlaceholderType.js.maptests/node_modules/@babel/types/lib/validators/isReferenced.js→isReferenced.js.maptests/node_modules/@babel/types/lib/validators/isScope.js→isScope.js.maptests/node_modules/@babel/types/lib/validators/isSpecifierDefault.js→isSpecifierDefault.js.maptests/node_modules/@babel/types/lib/validators/isType.js→isType.js.maptests/node_modules/@babel/types/lib/validators/isValidES3Identifier.js→isValidES3Identifier.js.maptests/node_modules/@babel/types/lib/validators/isValidIdentifier.js→isValidIdentifier.js.maptests/node_modules/@babel/types/lib/validators/isVar.js→isVar.js.maptests/node_modules/@babel/types/lib/validators/matchesPattern.js→matchesPattern.js.maptests/node_modules/@babel/types/lib/validators/react/isCompatTag.js→isCompatTag.js.maptests/node_modules/@babel/types/lib/validators/react/isReactComponent.js→isReactComponent.js.maptests/node_modules/@babel/types/lib/validators/validate.js→validate.js.maptests/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs→gen-mapping.mjs.maptests/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js→gen-mapping.umd.js.maptests/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs→resolve-uri.mjs.maptests/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js→resolve-uri.umd.js.maptests/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs→sourcemap-codec.mjs.maptests/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js→sourcemap-codec.umd.js.maptests/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs→trace-mapping.mjs.maptests/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js→trace-mapping.umd.js.maptests/node_modules/@jridgewell/trace-mapping/src/trace-mapping.ts→")tests/node_modules/@tootallnate/once/dist/index.js→index.js.maptests/node_modules/@tootallnate/once/dist/overloaded-parameters.js→overloaded-parameters.js.maptests/node_modules/@tootallnate/once/dist/types.js→types.js.maptests/node_modules/@types/node/vm.d.ts→sourcemap.jsontests/node_modules/agent-base/dist/src/index.js→index.js.maptests/node_modules/agent-base/dist/src/promisify.js→promisify.js.maptests/node_modules/entities/dist/commonjs/decode-codepoint.d.ts→decode-codepoint.d.ts.maptests/node_modules/entities/dist/commonjs/decode-codepoint.js→decode-codepoint.js.maptests/node_modules/entities/dist/commonjs/decode.d.ts→decode.d.ts.maptests/node_modules/entities/dist/commonjs/decode.js→decode.js.maptests/node_modules/entities/dist/commonjs/encode.d.ts→encode.d.ts.maptests/node_modules/entities/dist/commonjs/encode.js→encode.js.maptests/node_modules/entities/dist/commonjs/escape.d.ts→escape.d.ts.maptests/node_modules/entities/dist/commonjs/escape.js→escape.js.maptests/node_modules/entities/dist/commonjs/generated/decode-data-html.d.ts→decode-data-html.d.ts.maptests/node_modules/entities/dist/commonjs/generated/decode-data-html.js→decode-data-html.js.maptests/node_modules/entities/dist/commonjs/generated/decode-data-xml.d.ts→decode-data-xml.d.ts.maptests/node_modules/entities/dist/commonjs/generated/decode-data-xml.js→decode-data-xml.js.maptests/node_modules/entities/dist/commonjs/generated/encode-html.d.ts→encode-html.d.ts.maptests/node_modules/entities/dist/commonjs/generated/encode-html.js→encode-html.js.maptests/node_modules/entities/dist/commonjs/index.d.ts→index.d.ts.maptests/node_modules/entities/dist/commonjs/index.js→index.js.maptests/node_modules/entities/dist/esm/decode-codepoint.d.ts→decode-codepoint.d.ts.maptests/node_modules/entities/dist/esm/decode-codepoint.js→decode-codepoint.js.maptests/node_modules/entities/dist/esm/decode.d.ts→decode.d.ts.maptests/node_modules/entities/dist/esm/decode.js→decode.js.maptests/node_modules/entities/dist/esm/encode.d.ts→encode.d.ts.maptests/node_modules/entities/dist/esm/encode.js→encode.js.maptests/node_modules/entities/dist/esm/escape.d.ts→escape.d.ts.maptests/node_modules/entities/dist/esm/escape.js→escape.js.maptests/node_modules/entities/dist/esm/generated/decode-data-html.d.ts→decode-data-html.d.ts.maptests/node_modules/entities/dist/esm/generated/decode-data-html.js→decode-data-html.js.maptests/node_modules/entities/dist/esm/generated/decode-data-xml.d.ts→decode-data-xml.d.ts.maptests/node_modules/entities/dist/esm/generated/decode-data-xml.js→decode-data-xml.js.maptests/node_modules/entities/dist/esm/generated/encode-html.d.ts→encode-html.d.ts.maptests/node_modules/entities/dist/esm/generated/encode-html.js→encode-html.js.maptests/node_modules/entities/dist/esm/index.d.ts→index.d.ts.maptests/node_modules/entities/dist/esm/index.js→index.js.maptests/node_modules/get-caller-file/index.js→index.js.maptests/node_modules/http-proxy-agent/dist/agent.js→agent.js.maptests/node_modules/http-proxy-agent/dist/index.js→index.js.maptests/node_modules/https-proxy-agent/dist/agent.js→agent.js.maptests/node_modules/https-proxy-agent/dist/index.js→index.js.maptests/node_modules/https-proxy-agent/dist/parse-proxy-response.js→parse-proxy-response.js.maptests/node_modules/human-signals/build/src/core.js→core.js.maptests/node_modules/human-signals/build/src/main.js→main.js.maptests/node_modules/human-signals/build/src/realtime.js→realtime.js.maptests/node_modules/human-signals/build/src/signals.js→signals.js.maptests/node_modules/saxes/saxes.js→saxes.js.maptests/node_modules/source-map/dist/source-map.min.js→source-map.min.js.maptests/node_modules/sprintf-js/dist/angular-sprintf.min.js→angular-sprintf.min.maptests/node_modules/sprintf-js/dist/sprintf.min.js→sprintf.min.maptests/node_modules/xmlchars/xml/1.0/ed4.js→ed4.js.maptests/node_modules/xmlchars/xml/1.0/ed5.js→ed5.js.maptests/node_modules/xmlchars/xml/1.1/ed2.js→ed2.js.maptests/node_modules/xmlchars/xmlchars.js→xmlchars.js.maptests/node_modules/xmlchars/xmlns/1.0/ed3.js→ed3.js.map