mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-26 17:56:15 -04:00
add node consumer tests to travis
This commit is contained in:
parent
e4d98eba6b
commit
8548d39318
7 changed files with 174 additions and 46 deletions
29
tests/node/consumers/cjs-consumer.js
Normal file
29
tests/node/consumers/cjs-consumer.js
Normal file
|
@ -0,0 +1,29 @@
|
|||
/**
|
||||
* 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 chef = require("cyberchef");
|
||||
const assert = require("assert");
|
||||
|
||||
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");
|
Loading…
Add table
Add a link
Reference in a new issue