
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
parrot-friendly
Advanced tools
parrot-friendly is a helper library that allows you to write scenarios using a more declarative syntax. Based on the behavior driven development (BDD) syntax of libraries such as Jasmine and Mocha, parrot-friendly provides describe, it, and other methods to construct your scenarios object.
import { describe, it, get } from 'parrot-friendly';
const scenarios = describe('Ship Log', () => {
it('should display the ship log', () => {
get('/ship_log')
.response(require('./mocks/shipLog.json'))
.delay(1200);
});
it('should show an error', () => {
get('/ship_log').status(500);
});
});
export default scenarios;
describe(description, scenarioDefinitions)Returns a scenarios object based on the scenarioDefinitions declared.
description (String): Scenarios object description. Currently this is not used internally but supported to provide a more common API.scenarioDefinitions (Function): Function that will define scenarios when invoked.it(description, mockDefinitions)Adds a scenario with key description to the scenarios object.
description (String): Scenario description that will be used as a key to identify the scenario. Must be unique to a scenarios object.mockDefinitions: (Function): Function that will define mock objects when invoked.mock(mockDefinition)Creates a mock for a HTTP request where mockDefinition is the entire mock object. This can be used in place of chaining methods such as query and delay, or to provide custom mock handling with a function.
mockDefinition (Object or Function): Mock object with request and response keys or mock function.request(requestDefinition)Creates a mock for a HTTP request where requestDefinition is the entire request object. Can be used in place of chaining request methods such as query or to provide a custom matching function.
requestDefinition (Object or Function): Request object to be matched against or request function returning true for a match and false for a miss.METHOD(path)Creates a mock for a HTTP request where METHOD is one of get, head, post, put, del, connect, options, patch.
del is used in place of delete as delete is a JavaScript reserved word.
path (String): Path matcher string. May include route params..query(query)Matches against the query object provided.
.headers(headers)Matches against the headers object provided
.response(resource)Responds with the resource provided.
.delay(amount)Delays the response for amount of milliseconds.
.status(code)Responds with a code status code.
graphql(path, schema, mocks)Creates a mock for your GraphQL endpoint.
path (String): Path of your GraphQL endpoint.schema (String): GraphQL schema string.mocks (Object): Object describing your mocking logic that is passed to graphql-tools mockServer.FAQs
BDD syntax for writing Parrot scenarios.
The npm package parrot-friendly receives a total of 314 weekly downloads. As such, parrot-friendly popularity was classified as not popular.
We found that parrot-friendly demonstrated a not healthy version release cadence and project activity because the last version was released 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.