Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions environment.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
/* eslint-disable no-console */
const NodeEnvironment = require('jest-environment-node');
const debug = require('debug')('jest-dynamodb');

module.exports = class DynamoDBEnvironment extends NodeEnvironment {
constructor(config) {
super(config);
}

async setup() {
console.log('Setup DynamoDB Test Environment');
debug('Setup DynamoDB Test Environment');

await super.setup();
}

async teardown() {
console.log('Teardown DynamoDB Test Environment');
debug('Teardown DynamoDB Test Environment');

await super.teardown();
}
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
],
"dependencies": {
"cwd": "0.10.0",
"debug": "^4.1.1",
"dynamodb-local": "0.0.29"
},
"peerDependencies": {
Expand Down
3 changes: 2 additions & 1 deletion teardown.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
const DynamoDbLocal = require('dynamodb-local');
const debug = require('debug')('jest-dynamodb');

module.exports = async function() {
// eslint-disable-next-line no-console
console.log('Teardown DynamoDB');
debug('Teardown DynamoDB');
await DynamoDbLocal.stopChild(global.__DYNAMODB__);
};