mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00
test_runner: use source maps when reporting coverage
PR-URL: https://github.com/nodejs/node/pull/52060 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
This commit is contained in:
parent
6ad5353764
commit
814fa1ae74
11 changed files with 300 additions and 118 deletions
|
@ -73,6 +73,7 @@ const {
|
|||
ArrayPrototypeSort,
|
||||
ObjectPrototypeHasOwnProperty,
|
||||
StringPrototypeCharAt,
|
||||
Symbol,
|
||||
} = primordials;
|
||||
|
||||
const { validateObject } = require('internal/validators');
|
||||
|
@ -83,6 +84,8 @@ const VLQ_BASE_SHIFT = 5;
|
|||
const VLQ_BASE_MASK = (1 << 5) - 1;
|
||||
const VLQ_CONTINUATION_MASK = 1 << 5;
|
||||
|
||||
const kMappings = Symbol('kMappings');
|
||||
|
||||
class StringCharIterator {
|
||||
/**
|
||||
* @constructor
|
||||
|
@ -153,6 +156,10 @@ class SourceMap {
|
|||
return cloneSourceMapV3(this.#payload);
|
||||
}
|
||||
|
||||
get [kMappings]() {
|
||||
return this.#mappings;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {number[] | undefined} line lengths of generated source code
|
||||
*/
|
||||
|
@ -382,5 +389,6 @@ function compareSourceMapEntry(entry1, entry2) {
|
|||
}
|
||||
|
||||
module.exports = {
|
||||
kMappings,
|
||||
SourceMap,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue