Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@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 7 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.