fix(tests): update CJS and ESM consumer tests to use async/await for proper operation execution
This commit is contained in:
parent
7df747bbb1
commit
5d068e457c
@ -8,9 +8,9 @@
|
|||||||
|
|
||||||
const assert = require("assert");
|
const assert = require("assert");
|
||||||
|
|
||||||
require("cyberchef").then(chef => {
|
require("cyberchef").then(async chef => {
|
||||||
|
|
||||||
const d = chef.bake("Testing, 1 2 3", [
|
const d = await chef.bake("Testing, 1 2 3", [
|
||||||
chef.toHex,
|
chef.toHex,
|
||||||
chef.reverse,
|
chef.reverse,
|
||||||
{
|
{
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import assert from "assert";
|
|||||||
import chef from "cyberchef";
|
import chef from "cyberchef";
|
||||||
import { bake, toHex, reverse, unique, multiply } from "cyberchef";
|
import { bake, toHex, reverse, unique, multiply } from "cyberchef";
|
||||||
|
|
||||||
const a = bake("Testing, 1 2 3", [
|
const a = await bake("Testing, 1 2 3", [
|
||||||
toHex,
|
toHex,
|
||||||
reverse,
|
reverse,
|
||||||
{
|
{
|
||||||
@ -28,7 +28,7 @@ const a = bake("Testing, 1 2 3", [
|
|||||||
|
|
||||||
assert.equal(a.value, "630957449041920");
|
assert.equal(a.value, "630957449041920");
|
||||||
|
|
||||||
const b = chef.bake("Testing, 1 2 3", [
|
const b = await chef.bake("Testing, 1 2 3", [
|
||||||
chef.toHex,
|
chef.toHex,
|
||||||
chef.reverse,
|
chef.reverse,
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user