Installations
npm install aws-sdk-mock-mate
Developer Guide
Typescript
No
Module System
CommonJS
Min. Node Version
>=8.0.0
Node Version
9.2.0
NPM Version
5.5.1
Score
68.9
Supply Chain
91.3
Quality
75.2
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
egg-aws
Download Statistics
Total Downloads
3,639
Last Day
1
Last Week
4
Last Month
14
Last Year
145
GitHub Statistics
8 Commits
2 Watching
1 Branches
1 Contributors
Bundle Size
2.96 kB
Minified
1.07 kB
Minified + Gzipped
Package Meta Information
Latest Version
1.0.2
Package Id
aws-sdk-mock-mate@1.0.2
Unpacked Size
9.97 kB
Size
3.53 kB
File Count
6
NPM Version
5.5.1
Node Version
9.2.0
Total Downloads
Cumulative downloads
Total Downloads
3,639
Last day
0%
1
Compared to previous day
Last week
-33.3%
4
Compared to previous week
Last month
27.3%
14
Compared to previous month
Last year
-21.6%
145
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
aws-sdk-mock-mate
Mock tool for aws sdk.
Install
1$ npm i aws-sdk-mock-mate --save
Usage
1const mock = require('aws-sdk-mock-mate'); 2const AWS = require('aws-sdk'); 3 4mock(AWS, 'dynamodb', '2012-08-10', 'describeLimits', { 5 statusCode: 200, 6 body: { 7 AccountMaxReadCapacityUnits: 100, 8 AccountMaxWriteCapacityUnits: 100, 9 TableMaxReadCapacityUnits: 100, 10 TableMaxWriteCapacityUnits: 100 11 }, 12}); 13 14dynamodbClient.describeLimits() 15 .promise() 16 .then(result => { 17 console.log(result); 18 mock.restore(AWS, 'dynamodb', '2012-08-10', 'describeLimits'); 19 }).catch(err => console.log(err)); 20
API
mock(aws, serviceName, version, methodName, replyBody)
mock a aws service method with provided response body.aws
{ Object } a valid AWS SDK object.serviceName
{ String } a valid AWS service name.version
{ String } a valid AWS service version string.methodName
{ String } a valid service method name.replyBody
{ Object } mocked reply.statusCode
{ Number } status code. 200 for normal, 400 for exception.body
{ Object } response body. seem more at examples.
mock.restore(aws, serviceName, version, methodName)
restore the mock operation.aws
{ Object } a valid AWS SDK object.serviceName
{ String } optional. a valid AWS service name.version
{ String } optional. a valid AWS service version string.methodName
{ String } optional. a valid service method name.
Questions & Suggestions
Please open an issue here.
License
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 0/7 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 2 are checked with a SAST tool
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Score
3
/10
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More