feat: add fixture import harness and conformance test framework for BitVid parity cases

This commit is contained in:
thePR0M3TH3AN committed 2026-07-26 18:58:41 -04:00
1 parent 10326a2804
commit 1002185a03
8 files changed
+249 -20

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
// Shared test utilities for conformance harness
export function createFixture(name, state, target, expectation) {
return {
name,
state: {
adminState: state.adminState || {},
trust: state.trust || {},
reports: state.reports || [],
trustedMutes: state.trustedMutes || [],
overrides: state.overrides || {},
},
target,
expectation,
};
}
export function runConformanceTest(fixture, evaluator) {
const decision = evaluator(fixture.state, fixture.target);
return {
passed: JSON.stringify(decision) === JSON.stringify(fixture.expectation),
actual: decision,
expected: fixture.expectation,
};
}
+1 -1
View File
@@ -1,2 +1,2 @@
// Placeholder for testing module exports
// Testing package exports
export {};