CyberChef/tests/node/consumers/esm-deep-import-consumer.mjs

29 lines
584 B
JavaScript
Raw Normal View History

2019-08-02 12:10:15 +02:00
/**
* Tests to ensure that a consuming app can use named imports from deep import patch
*
* @author d98762625 [d98762625@gmail.com]
* @copyright Crown Copyright 2019
* @license Apache-2.0
*/
import assert from "assert";
2022-03-25 19:28:01 +01:00
import { bake, toHex, reverse, unique, multiply } from "cyberchef";
2019-08-02 12:10:15 +02:00
const d = bake("Testing, 1 2 3", [
toHex,
reverse,
{
op: unique,
args: {
delimiter: "Space",
}
},
{
op: multiply,
args: {
delimiter: "Space",
}
}
]);
assert.equal(d.value, "630957449041920");