MCPcopy Create free account
hub / github.com/Rich-Harris/magic-string / assertIntegrity

Function assertIntegrity

tests/Bundle/toMagicString.test.ts:9–13  ·  view source on GitHub ↗
(s: MagicString)

Source from the content-addressed store, hash-verified

7// The flattened result is a plain MagicString, so borrow the integrity checker's
8// walk to assert the rebuilt chunk list stays consistent.
9function assertIntegrity(s: MagicString): void {
10 const flat = s as unknown as IntegrityCheckingMagicString
11 Object.setPrototypeOf(flat, IntegrityCheckingMagicString.prototype)
12 flat.checkIntegrity()
13}
14
15describe('bundle', () => {
16 describe('toMagicString', () => {

Callers 1

Calls 1

checkIntegrityMethod · 0.80

Tested by

no test coverage detected