This commit is contained in:
n1474335 2023-03-23 17:46:47 +00:00
commit 1bba10e7c2
No known key found for this signature in database
GPG key ID: D15457B7B4AF3F37
4 changed files with 111 additions and 0 deletions

View file

@ -131,6 +131,7 @@ import "./tests/CMAC.mjs";
import "./tests/AESKeyWrap.mjs";
import "./tests/Rabbit.mjs";
import "./tests/LevenshteinDistance.mjs";
import "./tests/SwapCase.mjs";
// Cannot test operations that use the File type yet
// import "./tests/SplitColourChannels.mjs";

View file

@ -0,0 +1,33 @@
/**
* @author mikecat
* @copyright Crown Copyright 2023
* @license Apache-2.0
*/
import TestRegister from "../../lib/TestRegister.mjs";
TestRegister.addTests([
{
"name": "Swap Case: basic example",
"input": "Hello, World!",
"expectedOutput": "hELLO, wORLD!",
"recipeConfig": [
{
"op": "Swap case",
"args": [
],
},
],
},
{
"name": "Swap Case: empty input",
"input": "",
"expectedOutput": "",
"recipeConfig": [
{
"op": "Swap case",
"args": [
],
},
],
},
]);