monocart-coverage-reports 2.7.9 → 2.7.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -324,6 +324,8 @@ Possible solutions:
|
|
|
324
324
|
- Taking coverage data and adding it to the report.
|
|
325
325
|
- Example:
|
|
326
326
|
> node [./test/test-node-ins.js](./test/test-node-ins.js)
|
|
327
|
+
- vm Example (scriptOffset):
|
|
328
|
+
> node [./test/test-node-vm.js](./test/test-node-vm.js)
|
|
327
329
|
|
|
328
330
|
- [CDP](https://chromedevtools.github.io/devtools-protocol/) API
|
|
329
331
|
- Enabling [Node Debugging](https://nodejs.org/en/guides/debugging-getting-started/).
|
|
@@ -606,6 +606,12 @@ const getOriginalExclusiveEnd = (cache, state) => {
|
|
|
606
606
|
const { end } = cache;
|
|
607
607
|
const { decodedMappings } = state;
|
|
608
608
|
const endMappings = findMapping(decodedMappings, end);
|
|
609
|
+
if (!endMappings) {
|
|
610
|
+
return {
|
|
611
|
+
error: true,
|
|
612
|
+
errors: ['not found end mappings']
|
|
613
|
+
};
|
|
614
|
+
}
|
|
609
615
|
if (Array.isArray(endMappings)) {
|
|
610
616
|
return getFixedOriginalEnd(end, endMappings, state, cache);
|
|
611
617
|
}
|
|
@@ -853,6 +859,9 @@ const findOriginalRange = (start, end, state, originalMap) => {
|
|
|
853
859
|
cache.originalStart = originalStart;
|
|
854
860
|
|
|
855
861
|
const originalEndResult = getOriginalEndPosition(cache, state);
|
|
862
|
+
if (originalEndResult.error) {
|
|
863
|
+
return createMappingError(originalEndResult.errors);
|
|
864
|
+
}
|
|
856
865
|
const { originalEnd } = originalEndResult;
|
|
857
866
|
|
|
858
867
|
// range start > end
|