Security News
UK Officials Consider Banning Ransomware Payments from Public Entities
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
@slack/cli-test
Advanced tools
Node.js bindings for the Slack CLI for use in automated testing
This library is designed to automate the Slack Platform Command Line Interface (CLI). It provides a programmatic way to interact with the CLI using node.js and is used primarily for end-to-end (E22) testing.
SLACK_CLI_PATH
environment variable.npm install @slack/cli-test
SLACK_CLI_PATH
slack-cli
slack
otherwiseSlackCLI
, SlackTracerId
or any of the assertion helper functions (should*
) exported by this packageimport { SlackCLI } from '@slack/cli-test';
...
const actualOutput = await SlackCLI.runSimpleCommand('echo "hi"');
This package exports the following:
SlackCLI
- an object containing a variety of methods to interact with the CLISlackCLI.deploy()
shouldContainString
shouldContainStrings
shouldNotContainStrings
SlackTracerId
- trace IDs to verify CLI command outputSlackTracerId
objectSLACK_TEST_TRACE=true
// Import available objects from the package
import { SlackCLI, SlackTracerId, shouldContainStrings } from '@slack/cli-test';
describe('CLI - Feedback', () => {
// Create a variable with a link to cli binary installed on your machine
const cli = process.env.SLACK_CLI_PATH;
it('can successfully follow the feedback survey link', async function () {
// Create command
const command = `${cli} feedback`;
// Collect actual output from the command
const actual = await SlackCLI.runSimpleCommand(command);
// Set expected array of strings
const expected = [
// Expected string
'Feedback survey',
// Available trace
SlackTracerId.SLACK_TRACE_FEEDBACK_MESSAGE
];
// Check results with helper command
shouldContainStrings(actual, expected, command);
});
});
Environment Variable | Required | Note |
---|---|---|
SLACK_CLI_PATH | yes | path to Slack CLI binary |
SLACK_CLI_LOG_LEVEL | no | default: info . Logger levels |
FAQs
Node.js bindings for the Slack CLI for use in automated testing
The npm package @slack/cli-test receives a total of 18 weekly downloads. As such, @slack/cli-test popularity was classified as not popular.
We found that @slack/cli-test demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.