Build a CLI App with Oclif and Node.js Using Test-Driven Development: Part 2by@brennon

Build a CLI App with Oclif and Node.js Using Test-Driven Development: Part 2

tldt arrow
Read on Terminal Reader
Read this story w/o Javascript

Too Long; Didn't Read

In summary, we laid out plans for using TDD to build a CLI application using the oclif framework. We spent some time getting to know the @oclif/test package and some of the helpers provided by that library. Specifically, we talked about: - Using the command method for calling our command and passing it arguments. - Methods provided by @oclif/fancy-test for stubbing parts of our application, catching errors, mocking stdout and stderr, and asserting on those results. - Using TDD to build out a large portion of a CLI using a red-green cycle by writing tests first and then writing the minimal amount of code to get our tests to pass.

Company Mentioned

Mention Thumbnail
featured image - Build a CLI App with Oclif and Node.js Using Test-Driven Development: Part 2
Brennon Loveless HackerNoon profile picture

@brennon

Brennon Loveless


Receive Stories from @brennon

react to story with heart

RELATED STORIES

L O A D I N G
. . . comments & more!
Hackernoon hq - po box 2206, edwards, colorado 81632, usa