{"library":"cli-testlab","type":"library","category":null,"description":"cli-testlab is a specialized test framework designed for Node.js command-line interface (CLI) applications. Currently at stable version 6.0.1, it provides a streamlined API for executing shell commands, capturing their standard output and error streams, and asserting on their content. Key features include the `execCommand` function, which integrates robust assertion capabilities for positive, negative, and error-based output checks, supporting both string and array inputs for comprehensive validation. It also facilitates the management of environment variables per command execution and offers a `FileTestHelper` class for automatic cleanup of test-generated files. This library differentiates itself by focusing specifically on the unique challenges of CLI testing, offering built-in utilities that abstract away common complexities like child process management and output parsing, making it simpler to write reliable and maintainable tests for CLI tools without relying on heavy general-purpose test runners for these specific tasks.","language":"javascript","status":"active","version":"6.0.1","tags":["javascript","cli","test","tests","testing","framework","commandline","terminal","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install cli-testlab","imports":["import { execCommand } from 'cli-testlab'","import { FileTestHelper } from 'cli-testlab'","import cliTestlab from 'cli-testlab'; const { execCommand } = cliTestlab;"]},{"cmd":"yarn add cli-testlab","imports":[]},{"cmd":"pnpm add cli-testlab","imports":[]}],"homepage":null,"github":"https://github.com/kibertoad/cli-testlab","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/cli-testlab","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/cli-testlab/compatibility"}}