UNPKG

@shelf/jest-dynamodb

Version:

Run your tests using Jest & DynamoDB local

15 lines (14 loc) 554 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = getConfig; var _path = require("path"); var _cwd = _interopRequireDefault(require("cwd")); function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } async function getConfig(debug) { const path = process.env.JEST_DYNAMODB_CONFIG || (0, _path.resolve)((0, _cwd.default)(), 'jest-dynamodb-config.js'); const config = require(path); debug('config:', config); return typeof config === 'function' ? await config() : config; }