endojs / endo

Endo is a distributed secure JavaScript sandbox, based on SES
Apache License 2.0
801 stars 71 forks source link

test cover cli demo #2368

Closed grypez closed 3 weeks ago

grypez commented 1 month ago

What is the Problem Being Solved?

The cli package is not currently tested. It would be nice to write some tests, and the demo seems like a good place to start.

Description of the Design

For each runnable section of the cli demo, produce a bash script executing that functionality and a log of the expected output of the script, then assert equality of the expected and observed output of the script using diff (for an example see the description of this issue).

Out of Scope

kriskowal commented 1 month ago

You may have more luck ensuring portability if the tests are framed as Node.js shelling out to the CLI. Execa is popular at Agoric. https://www.npmjs.com/package/execa