• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

nodecraft / spawnpoint / 20214270289

14 Dec 2025 09:16PM UTC coverage: 84.697% (-5.4%) from 90.076%
20214270289

Pull #105

github

Cherry
refactor: tests to vitest
Pull Request #105: refactor: tests to vitest

259 of 348 branches covered (74.43%)

Branch coverage included in aggregate %.

8 of 8 new or added lines in 1 file covered. (100.0%)

32 existing lines in 3 files now uncovered.

538 of 593 relevant lines covered (90.73%)

2112.48 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

76.47
/lib/json-handler.js
1
'use strict';
2

3
const fs = require('node:fs');
60✔
4

5
const stripJsonCommentsRaw = require('strip-json-comments');
60✔
6

7
const stripJsonComments = stripJsonCommentsRaw?.default || stripJsonCommentsRaw;
1,188!
8

9
// eslint-disable-next-line n/no-deprecated-api
10
require.extensions['.json'] = function(module, filename) {
1,188✔
11
        let content = fs.readFileSync(filename, 'utf8');
1,188✔
12

13
        // Only strip comments if file likely contains them
UNCOV
14
        if (content.includes('//') || content.includes('/*')) {
×
15
                content = stripJsonComments(content);
6✔
16
        }
17

18
        try {
24✔
19
                module.exports = JSON.parse(content);
24✔
20
        } catch (err) {
21
                // Add filename to error for better debugging
22
                err.message = `${err.message} in ${filename}`;
12✔
23
                throw err;
12✔
24
        }
25
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc