
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
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,194 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.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.