pkgjs / wiby

"Will I break you" - a tool for testing dependents
Apache License 2.0
33 stars 7 forks source link

Add tests for CLI flow #26

Closed rodion-arr closed 4 years ago

rodion-arr commented 4 years ago

Current test suites do not cover CLI flow. As we see here (https://github.com/pkgjs/wiby/pull/25#discussion_r464467923) breaking yargs was not reflected in tests - all was green.

Will adding tests for CLI interface be valuable at current project phase?

dominykas commented 4 years ago

I think it's useful, yes - we're also lacking some e2e coverage in general. Not sure how GH will react if we start running tests agains the live version of the repos from our local dev environments (and I was reluctant to add a GH token to the Travis jobs just yet - I figure we'll want to set up a bot account or smth for that - unsure about best practices there).

rodion-arr commented 4 years ago

Why can't we just mock external requests in unit tests?

dominykas commented 4 years ago

We can, but that requires a bit more work to test the CLI? Not that we shouldn't do it.

rodion-arr commented 4 years ago

I'm going to write some more tests for CLI interface with mocked requests to GitHub. So at least it will cover expected commands and options but the real logic of this commands will be covered it theirs own tests. Is it OK from your side?

dominykas commented 4 years ago

At the current stage, I'm more likely than not to approve any kind of tests ;)

dominykas commented 3 years ago

:tada: This issue has been resolved in version 0.1.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: