Skip to content
This repository has been archived by the owner on Jul 6, 2022. It is now read-only.

Commit

Permalink
Merge pull request #2 from campsi/greenkeeper/initial
Browse files Browse the repository at this point in the history
Update dependencies to enable Greenkeeper 🌴
  • Loading branch information
ChristopheBraud authored Jan 5, 2018
2 parents bbbfdc1 + e7879f8 commit 97fc024
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: node_js
node_js:
- 6
- 7
services:
- mongodb
addons:
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# campsi-service-webhooks

[![Greenkeeper badge](https://badges.greenkeeper.io/campsi/campsi-service-webhooks.svg)](https://greenkeeper.io/)
[![Build Status][build-image]][build-url]
[![Coverage Status][coverage-image]][coverage-url]
[![Known Vulnerabilities][vulnerabilities-image]][vulnerabilities-url]
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"dependencies": {
"debug": "^3.1.0",
"for-in": "^1.0.2",
"mongodb": "^2.2.33",
"mongodb": "^3.0.1",
"string-format": "^0.5.0"
},
"devDependencies": {
Expand All @@ -24,7 +24,7 @@
"eslint": "^4.11.0",
"eslint-plugin-indexof": "^0.1.1",
"istanbul": "^0.4.5",
"mocha": "^3.5.3",
"mocha": "^4.1.0",
"mocha-lcov-reporter": "^1.3.0"
},
"altDependencies": {
Expand Down
6 changes: 5 additions & 1 deletion test/config/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ module.exports = {
host: host,
title: 'Test Assets',
campsi: {
mongoURI: 'mongodb://localhost:27017/relationships',
mongo: {
'host': 'localhost',
'port': 27017,
'name': 'relationships'
}
},
services: {
trace: {
Expand Down
8 changes: 5 additions & 3 deletions test/webhooks.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
process.env.NODE_CONFIG_DIR = './test/config';
process.env.NODE_ENV = 'test';

const {MongoClient} = require('mongodb');
const {MongoClient, Server} = require('mongodb');
const debug = require('debug')('campsi:test');
const chai = require('chai');
const chaiHttp = require('chai-http');
Expand All @@ -23,9 +23,11 @@ describe('Assets API', () => {
beforeEach((done) => {

// Empty the database
MongoClient.connect(config.campsi.mongoURI).then((db) => {
let client = new MongoClient(new Server(config.campsi.mongo.host, config.campsi.mongo.port));
client.connect((error, mongoClient) => {
let db = mongoClient.db(config.campsi.mongo.name);
db.dropDatabase(() => {
db.close();
client.close();
campsi = new CampsiServer(config.campsi);
campsi.mount('trace', new services.Trace(config.services.trace));
campsi.mount('webhooks', new services.WebHooks(config.services.webHooks));
Expand Down

0 comments on commit 97fc024

Please sign in to comment.