MCPcopy Create free account
hub / github.com/chirpstack/chirpstack / test_encode_fport

Function test_encode_fport

chirpstack/src/codec/js/mod.rs:419–436  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

417
418 #[tokio::test]
419 pub async fn test_encode_fport() {
420 let encoder = r#"
421 function encodeDownlink(input) {
422 return {
423 fPort: 20,
424 bytes: [],
425 };
426 }
427 "#
428 .to_string();
429
430 let vars: HashMap<String, String> = HashMap::new();
431
432 let input = prost_types::Struct::default();
433
434 let out = encode(10, &vars, &encoder, &input).await.unwrap();
435 assert_eq!((20, vec![]), out);
436 }
437}

Callers

nothing calls this directly

Calls 3

to_stringMethod · 0.80
unwrapMethod · 0.80
encodeFunction · 0.70

Tested by

no test coverage detected