jest-dynalite
Advanced tools
Comparing version 1.0.0 to 1.0.2
@@ -13,2 +13,5 @@ "use strict"; | ||
process.env.MOCK_DYNAMODB_ENDPOINT = `localhost:${port}`; | ||
// aws-sdk requires access and secret key to be able to call DDB | ||
process.env.AWS_ACCESS_KEY_ID = "access-key"; | ||
process.env.AWS_SECRET_ACCESS_KEY = "secret-key"; | ||
class DynaliteEnvironment extends jest_environment_node_1.default { | ||
@@ -15,0 +18,0 @@ constructor() { |
{ | ||
"name": "jest-dynalite", | ||
"version": "1.0.0", | ||
"version": "1.0.2", | ||
"description": "Run your tests using Jest & Dynalite", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -16,2 +16,3 @@ # jest-dynalite | ||
## Usage | ||
``` | ||
@@ -22,2 +23,3 @@ yarn add jest-dynalite -D | ||
jest.config.js | ||
```javascript | ||
@@ -32,2 +34,3 @@ module.exports = { | ||
which should exist for your tests. | ||
```json | ||
@@ -43,1 +46,20 @@ { | ||
``` | ||
Usage | ||
```javascript | ||
const ddb = new DocumentClient({ | ||
...yourConfig, | ||
...(process.env.MOCK_DYNAMODB_ENDPOINT && { | ||
endpoint: process.env.MOCK_DYNAMODB_ENDPOINT, | ||
sslEnabled: false, | ||
region: "local" | ||
}) | ||
}); | ||
``` | ||
`process.env.MOCK_DYNAMODB_ENDPOINT` is unqiue to test runner | ||
## License | ||
`MIT` |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10528
87
62
10