
Product
Introducing Scala and Kotlin Support in Socket
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
cli-testing-library
Advanced tools
Simple and complete CLI testing utilities that encourage good testing practices.
Simple and complete CLI testing utilities that encourage good testing practices.
This project is not affiliated with the "Testing Library" ecosystem that this project is clearly inspired from. We're just big fans :)
This module is distributed via [npm][npm] which is bundled with [node][node] and
should be installed as one of your project's devDependencies
:
npm install --save-dev cli-testing-library
This is currently the only section of "usage" documentation. We'll be expanding it as soon as possible
Usage example:
const {resolve} = require('path')
const {render, fireEvent} = require('cli-testing-library')
test('Is able to make terminal input and view in-progress stdout', async () => {
const {cleanup, findByText} = await render('node', [
resolve(__dirname, './execute-scripts/stdio-inquirer.js'),
])
const instance = await findByText('First option')
expect(instance).toBeTruthy()
expect(await findByText('❯ One')).toBeTruthy()
cleanup()
fireEvent.down(instance)
expect(await findByText('❯ Two')).toBeTruthy()
cleanup()
fireEvent.enter(instance)
expect(await findByText('First option: Two')).toBeTruthy()
})
Thanks goes to these wonderful people (emoji key):
Corbin Crutchley 💻 📖 🚧 |
This project follows the all-contributors specification. Contributions of any kind welcome!
FAQs
Simple and complete CLI testing utilities that encourage good testing practices.
The npm package cli-testing-library receives a total of 2,256 weekly downloads. As such, cli-testing-library popularity was classified as popular.
We found that cli-testing-library demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
Application Security
/Security News
Socket CEO Feross Aboukhadijeh and a16z partner Joel de la Garza discuss vibe coding, AI-driven software development, and how the rise of LLMs, despite their risks, still points toward a more secure and innovative future.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.