mirror of
https://github.com/lexmount/moli.git
synced 2026-11-13 16:10:01 +00:00
Parse the vendored schema with serde_json::Value and serialize compact JSON in build.rs. Embed the generated bytes without request-time processing. Verify the embedded protocol matches the complete vendored schema. Validation on the unchanged final source tree: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast (20,505 passed, 18 existing skips).
12 lines
473 B
Rust
12 lines
473 B
Rust
use moli_protocol_cdp::CDP_PROTOCOL_JSON;
|
|
use serde_json::Value;
|
|
|
|
#[test]
|
|
fn embedded_protocol_preserves_the_complete_vendored_schema() {
|
|
let source = include_str!("../../vendor/v8-152.2.0/v8/include/js_protocol-1.3.json");
|
|
let original: Value = serde_json::from_str(source).expect("valid vendored CDP protocol");
|
|
let embedded: Value =
|
|
serde_json::from_str(CDP_PROTOCOL_JSON).expect("valid embedded CDP protocol");
|
|
assert_eq!(embedded, original);
|
|
}
|