1
0
mirror of synced 2024-12-13 15:31:05 +01:00
CyberChef/tests/node/consumers/cjs-consumer.js

33 lines
632 B
JavaScript
Raw Normal View History

2019-08-02 12:10:15 +02:00
/**
* 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");
2022-03-25 19:28:01 +01:00
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",
}
2019-08-02 12:10:15 +02:00
}
2022-03-25 19:28:01 +01:00
]);
assert.equal(d.value, "630957449041920");
2019-08-02 12:10:15 +02:00
2022-03-25 19:28:01 +01:00
});