Skip to content

Conversation

@nigrosimone
Copy link
Contributor

@nigrosimone nigrosimone commented Jan 24, 2026

I attempted an optimization and all tests are passing, but only because some cases are currently missing. This PR improves test coverage to prevent similar issues in the future.

This PR adds only tests (no benchmark needed)

MASTER

----------------------------|---------|----------|---------|---------|----------------------------
File                        | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
----------------------------|---------|----------|---------|---------|----------------------------
All files                   |   81.48 |    69.12 |   31.12 |   81.48 |                            
 fast-json-stringify        |    96.7 |    95.16 |     100 |    96.7 |                            
  index.js                  |    96.7 |    95.16 |     100 |    96.7 | ...605-606,613-640,968-969 
 fast-json-stringify/.cache |   42.85 |    50.77 |   25.85 |   42.85 |                            
  webpacktest.js            |   42.85 |    50.77 |   25.85 |   42.85 | 2-3,5-6                    
 fast-json-stringify/lib    |   68.49 |    73.59 |    92.3 |   68.49 |                            
  location.js               |     100 |      100 |     100 |     100 |                            
  merge-schemas.js          |     100 |      100 |     100 |     100 |                            
  schema-validator.js       |   61.02 |    61.88 |     100 |   61.02 | ...058,1068-1070,1078-1084 
  serializer.js             |   97.87 |    98.59 |    90.9 |   97.87 | 96,139-140                 
  standalone.js             |     100 |      100 |     100 |     100 |                            
  validator.js              |   91.66 |    90.47 |   85.71 |   91.66 | 36-37,88-93                
----------------------------|---------|----------|---------|---------|----------------------------

PR

----------------------------|---------|----------|---------|---------|----------------------------
File                        | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
----------------------------|---------|----------|---------|---------|----------------------------
All files                   |   82.74 |    69.81 |   31.41 |   82.74 |                            
 fast-json-stringify        |   96.86 |    95.49 |     100 |   96.86 |                            
  index.js                  |   96.86 |    95.49 |     100 |   96.86 | ...597-602,605-606,613-640 
 fast-json-stringify/.cache |   42.85 |    50.77 |   25.85 |   42.85 |                            
  webpacktest.js            |   42.85 |    50.77 |   25.85 |   42.85 | 2-3,5-6                    
 fast-json-stringify/lib    |   70.72 |    75.47 |     100 |   70.72 |                            
  location.js               |     100 |      100 |     100 |     100 |                            
  merge-schemas.js          |     100 |      100 |     100 |     100 |                            
  schema-validator.js       |   63.13 |    65.11 |     100 |   63.13 | ...000,1008-1010,1020-1022 
  serializer.js             |   99.29 |    98.61 |     100 |   99.29 | 96                         
  standalone.js             |     100 |      100 |     100 |     100 |                            
  validator.js              |   97.91 |     90.9 |     100 |   97.91 | 36-37                      
----------------------------|---------|----------|---------|---------|----------------------------

@nigrosimone nigrosimone marked this pull request as ready for review January 24, 2026 19:22
@nigrosimone nigrosimone changed the title feat: improve test coverage feat: improve test coverage (~1%) Jan 24, 2026
Copy link
Member

@gurgunday gurgunday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants