All files / istanbul-lib-instrument/src constants.ts

100% Statements 4/4
100% Branches 0/0
100% Functions 0/0
100% Lines 4/4

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13          6x   6x 6x 6x      
import { createHash } from "node:crypto";
 
import pkg from "../package.json" with { type: "json" };
// TODO: increment this version if there are schema changes
// that are not backwards compatible:
const VERSION = "4";
 
export const SHA = "sha1";
export const MAGIC_KEY = "_coverageSchema";
export const MAGIC_VALUE = createHash(SHA)
  .update(pkg.name + "@" + VERSION)
  .digest("hex");