With ideas from: cyphercodes <cyphercodes@users.noreply.github.com> With ideas from: Sivachandran Paramasivam <sivachandran.p@gmail.com>
34 lines
666 B
JavaScript
34 lines
666 B
JavaScript
/**
|
|
* Tests for arithmetical operations
|
|
*
|
|
* @copyright Crown Copyright 2026
|
|
* @license Apache-2.0
|
|
*/
|
|
|
|
import TestRegister from "../../lib/TestRegister.mjs";
|
|
|
|
TestRegister.addTests([
|
|
{
|
|
name: "Subtract",
|
|
input: "321,123,test",
|
|
expectedOutput: "198",
|
|
recipeConfig: [
|
|
{
|
|
"op": "Subtract",
|
|
"args": ["Comma"]
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: "Subtract - no valid input",
|
|
input: "test",
|
|
expectedOutput: "NaN",
|
|
recipeConfig: [
|
|
{
|
|
"op": "Subtract",
|
|
"args": ["Comma"]
|
|
},
|
|
],
|
|
},
|
|
]);
|