-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added test for 'Decode Protobuf' operation
- Loading branch information
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/** | ||
* Protobuf tests. | ||
* | ||
* @author n1474335 [[email protected]] | ||
* @copyright Crown Copyright 2019 | ||
* @license Apache-2.0 | ||
*/ | ||
|
||
import TestRegister from "../TestRegister"; | ||
|
||
TestRegister.addTests([ | ||
{ | ||
name: "Protobuf Decode", | ||
input: "0d1c0000001203596f751a024d65202b2a0a0a066162633132331200", | ||
expectedOutput: JSON.stringify({ | ||
"1": 469762048, | ||
"2": "You", | ||
"3": "Me", | ||
"4": 43, | ||
"5": { | ||
"1": "abc123", | ||
"2": {} | ||
} | ||
}, null, 4), | ||
recipeConfig: [ | ||
{ | ||
"op": "From Hex", | ||
"args": ["Auto"] | ||
}, | ||
{ | ||
"op": "Protobuf Decode", | ||
"args": [] | ||
} | ||
] | ||
}, | ||
]); |