Skip to content

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

Open
@gr2m

Description

@gr2m

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions