1.2.0 • Published 2 years ago

testable-cli v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

testable-cli

An easy way to create testable CLIs, based on the principle of testing based on how the user would interact with the system.

import {ConsoleLogOutputHandler, MainMenuProgramState, CLIEngine} from "testable-cli";

const output = new ConsoleLogOutputHandler();
const initialState = new MainMenuProgramState(output);
const engine = new CLIEngine(initialState);

engine.sendMessage("Hello, world!");

Changelog

1.2.0

  • Changed project from being of type module to being a regular NPM project with CommonJS.
  • Added changelog to README.md.
  • Added basic example of how to use the package in README.md.

1.1.0

  • Fixed bug where state transitions in CLIEngine were not possible.
  • Refactored and moved various classes around.
  • Added example states: MainMenuProgramState and GreetingProgramState. These can be used in real projects if desired.
  • Added documentation to all relevant files.

1.0.0

  • First release