mirror of
https://github.com/gchq/CyberChef.git
synced 2024-11-16 08:58:30 +01:00
32 lines
632 B
JavaScript
32 lines
632 B
JavaScript
/**
|
|
* Tests to ensure that a consuming app can use CJS require
|
|
*
|
|
* @author d98762625 [d98762625@gmail.com]
|
|
* @copyright Crown Copyright 2019
|
|
* @license Apache-2.0
|
|
*/
|
|
|
|
const assert = require("assert");
|
|
|
|
require("cyberchef").then(chef => {
|
|
|
|
const d = chef.bake("Testing, 1 2 3", [
|
|
chef.toHex,
|
|
chef.reverse,
|
|
{
|
|
op: chef.unique,
|
|
args: {
|
|
delimiter: "Space",
|
|
}
|
|
},
|
|
{
|
|
op: chef.multiply,
|
|
args: {
|
|
delimiter: "Space",
|
|
}
|
|
}
|
|
]);
|
|
|
|
assert.equal(d.value, "630957449041920");
|
|
|
|
});
|