Authored-by: engin0223 <engineda2014@hotmail.com> Changes cherry-picked by GCHQDeveloper581 <63102987+GCHQDeveloper581@users.noreply.github.com> Breaking change: Alters Node API - "bake" and "execute" are now declared async.
33 lines
644 B
JavaScript
33 lines
644 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(async chef => {
|
|
|
|
const d = await 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");
|
|
|
|
});
|