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

Commit

Permalink
Merge remote-tracking branch 'origin/greenkeeper/initial'
Browse files Browse the repository at this point in the history
  • Loading branch information
Christophe Braud committed Jan 18, 2018
2 parents 97fc024 + 9a424bd commit 5da8a27
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"string-format": "^0.5.0"
},
"devDependencies": {
"campsi": "git://github.com/campsi/campsi.git",
"campsi-service-trace": "git://github.com/campsi/campsi-service-trace.git",
"campsi": "^1.0.2",
"campsi-service-trace": "^1.0.1",
"chai": "^4.1.2",
"chai-http": "^3.0.0",
"config": "^1.28.0",
Expand All @@ -25,7 +25,8 @@
"eslint-plugin-indexof": "^0.1.1",
"istanbul": "^0.4.5",
"mocha": "^4.1.0",
"mocha-lcov-reporter": "^1.3.0"
"mocha-lcov-reporter": "^1.3.0",
"mongo-uri-builder": "^1.0.3"
},
"altDependencies": {
"dev": {
Expand Down
2 changes: 1 addition & 1 deletion test/config/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
mongo: {
'host': 'localhost',
'port': 27017,
'name': 'relationships'
'database': 'relationships'
}
},
services: {
Expand Down
11 changes: 5 additions & 6 deletions test/webhooks.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
process.env.NODE_CONFIG_DIR = './test/config';
process.env.NODE_ENV = 'test';

const {MongoClient, Server} = require('mongodb');
const { MongoClient } = require('mongodb');
const mongoUriBuilder = require('mongo-uri-builder');
const debug = require('debug')('campsi:test');
const chai = require('chai');
const chaiHttp = require('chai-http');
Expand All @@ -21,11 +22,9 @@ const services = {

describe('Assets API', () => {
beforeEach((done) => {

// Empty the database
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);
const mongoUri = mongoUriBuilder(config.campsi.mongo);
MongoClient.connect(mongoUri, (err, client) => {
let db = client.db(config.campsi.mongo.database);
db.dropDatabase(() => {
client.close();
campsi = new CampsiServer(config.campsi);
Expand Down

0 comments on commit 5da8a27

Please sign in to comment.