Add tests

This commit is contained in:
clubby789 2020-08-01 13:15:06 +01:00
parent e019ba6ee0
commit 4986f16478
2 changed files with 35 additions and 0 deletions

View file

@ -25,6 +25,7 @@ import "./tests/Base64.mjs";
import "./tests/Base62.mjs";
import "./tests/BitwiseOp.mjs";
import "./tests/ByteRepr.mjs";
import "./tests/BytesLong.mjs";
import "./tests/CartesianProduct.mjs";
import "./tests/CharEnc.mjs";
import "./tests/ChangeIPFormat.mjs";

View file

@ -0,0 +1,34 @@
/**
* Avro to JSON tests.
*
* @author jarrodconnolly [jarrod@nestedquotes.ca]
* @copyright Crown Copyright 2019
* @license Apache-2.0
*/
import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([
{
name: "Bytes to Long",
input: "This is a testing string!",
expectedOutput: "529836718428447222471796396193323181240742300695594145834785",
recipeConfig: [
{
op: "Bytes to Long",
args: []
}
],
},
{
name: "Long to Bytes",
input: "529836718428447222471796396193323181240742300695594145834785",
expectedOutput: "This is a testing string!",
recipeConfig: [
{
op: "Long to Bytes",
args: []
}
],
}
]);