mirror of
https://github.com/morluto/rea.git
synced 2026-11-11 09:21:16 +00:00
test(sourcemaps): assert semantic evidence and actual output admission
Replace stale closed-property expectations with assertions for the evidence under test. Verify compiler coordinates and declaration indices separately in the real-browser workflow. Consolidate duplicate 50000-map admission cases and derive admission from exact serialized bytes rather than IP-address-specific output shapes. Retain capacity, omission, and aggregate-byte coverage. A bounded Flameox CPU profile completed in about 1.4 seconds and showed no producer bottleneck; targeted admission and real Chrome CLI/MCP verification pass.
This commit is contained in:
1 parent
9f67e44e5d
commit
bd74c7af2b
4 files changed
+77
-53
No files matched your search
@@ -150,7 +150,16 @@ async function verifyCase(executable, entrypoint, scenario) {
|
||||
phase = "public-map-assertions";
|
||||
observed = item?.mappings;
|
||||
assert.equal(item.status, "included");
|
||||
assert.deepEqual(item.mappings, expected);
|
||||
assert.equal(item.mappings.length, expected.length);
|
||||
for (const [index, coordinates] of expected.entries()) {
|
||||
const mapping = item.mappings[index];
|
||||
for (const [key, value] of Object.entries(coordinates))
|
||||
assert.deepEqual(mapping[key], value);
|
||||
// This compiler fixture has one source declaration in one wrapped leaf.
|
||||
assert.equal(mapping.source_index, 0);
|
||||
assert.equal(mapping.declaration_index, 0);
|
||||
}
|
||||
assert.equal(item.original_sources.length, 1);
|
||||
assert.equal(item.artifact.sha256, sha(site.map));
|
||||
assert.equal(item.artifact.bytes, Buffer.byteLength(site.map));
|
||||
assert.equal(item.original_sources[0].artifact.sha256, sha(site.original));
|
||||
|
||||
Reference in new issue
Block a user