Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figure out a good way to create/update tests for octoherd scripts #7

Open
gr2m opened this issue Dec 16, 2020 · 0 comments
Open

Figure out a good way to create/update tests for octoherd scripts #7

gr2m opened this issue Dec 16, 2020 · 0 comments

Comments

@gr2m
Copy link
Member

gr2m commented Dec 16, 2020

I could imagine to add a --record [name] flag which would record all requests/responses similar to nock's recording feature.

It would write the request fixtures with sensitive credentials removed into a recordings/[name] folder. We could then add a --replay [name] flag to replay the recording as a means of testing, e.g.

$ octoherd --record add-star script.js gr2m/octoherd-test-add-star
[INFO] requests recorded into test/add-star
$ octoherd --replay add-star script.js
[INFO] replay successful

I think for the sake of simplicity we should allow for only one repository to be recorded

It might also make sense to to introduce commands, such as octoherd run, octoherd record, octoherd replay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant