Closed mi-g closed 1 year ago
And any reason to not send ((a) => {${code}})('${challenge}')
as a parameter, and make this function more generic?
Also, add a test here: https://github.com/aclap-dev/vdhcoapp/blob/coapp-1.7.0/tests/test.mjs
Something as simple as:
let x = await exec("challenge", "return a + 1", 42);
assert("challenge", x, 43);
You can run the test simply with:
./test/test.mjs
Make sure to have node 18 as your node version.
Maybe add a way to distinguish between a null result and an exception result.