Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
@serverless/event-mocks
Advanced tools
Event Mocks is a simple library designed to generate simple AWS events for testing and automation purposes.
A small library that includes details mocks of AWS Lambda event sources. Useful for use when unit testing your Lambda functions. Supported Event Sources are: SNS, API Gateway, S3, & Scheduled.
The library simply uses default event source mock templates and merge it with any overwrite you provide. Check out the JSON template files to learn more about the data structure of each event source.
const createEvent = require('aws-event-mocks');
const mocked = createEvent({
template: 'aws:sns',
merge: {
Records: [{
Sns: {
Message: 'trigger-email'
}
}]
}
});
const createEvent = require('aws-event-mocks');
const event = createEvent({
template: 'aws:apiGateway',
merge: {
body: {
first_name: 'Sam',
last_name: 'Smith'
}
}
});
const createEvent = require('aws-event-mocks');
const event = createEvent({
template: 'aws:s3',
merge: {
Records: [{
eventName: 'ObjectCreated:Put',
s3: {
bucket: {
name: 'my-bucket-name'
},
object: {
key: 'object-key'
}
}
}]
}
});
const createEvent = require('aws-event-mocks');
const event = createEvent({
template: 'aws:scheduled',
merge: {
region: 'us-west-2'
}
});
const createEvent = require('aws-event-mocks');
const event = createEvent({
template: 'aws:kinesis',
merge: {
data: new Buffer('this is test data').toString('base64')
}
});
FAQs
Event Mocks is a simple library designed to generate simple AWS events for testing and automation purposes.
The npm package @serverless/event-mocks receives a total of 854,082 weekly downloads. As such, @serverless/event-mocks popularity was classified as popular.
We found that @serverless/event-mocks demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.