Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jest-dynalite

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-dynalite

Run your tests using Jest & Dynalite

  • 1.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
44K
increased by18.82%
Maintainers
1
Weekly downloads
 
Created
Source

jest-dynalite

Pipeline status Npm version code style: prettier

Enchanced @shelf/jest-dynamodb

jest-dynalite is a fork of @shelf/jest-dynamodb used to allow unit tests to perform dynamodb queries locally.

Behaviour

jest-dynalite runs a dynalite instance per test runner, which means test runners do not interfear with eachother.

jest-dynalite clears tables between tests, so every test has a clean environment to run in.

Usage

yarn add jest-dynalite -D

jest.config.js

module.exports = {
  ...
  preset: "./jest-preset.js"
}

Create a jest-dynalite-config.json in your package root, which contain the tables which should exist for your tests.

{
  "tables": [
    {
      ...
    }
  ],
  "basePort": 8000
}

Usage

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

Keywords

FAQs

Package last updated on 12 Oct 2019

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc