Skip to content

Commit

Permalink
Merge branch 'release/1.2.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
lykmapipo committed Oct 16, 2018
2 parents 83c1935 + 6f4c44e commit 1ace9f9
Show file tree
Hide file tree
Showing 11 changed files with 603 additions and 379 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 1.2.3 / 16-10-2018
- Force latest dependencies
- Push dependencies to peerDependencies
- Improve integration test

# 1.2.1 / 09-09-2018
- force latest dependencies
- run security audit fix
Expand Down
854 changes: 527 additions & 327 deletions package-lock.json

Large diffs are not rendered by default.

37 changes: 25 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@codetanzania/majifix-service-group",
"version": "1.2.2",
"version": "1.2.3",
"description": "A representation of an entity that group services offered by a jurisdiction(s) into meaningful categories e.g Sanitation.",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -43,32 +43,45 @@
},
"devDependencies": {
"@benmaruchu/faker": "^4.2.1",
"chai": "^4.1.2",
"@codetanzania/majifix-common": "^0.11.1",
"@codetanzania/majifix-jurisdiction": "^1.5.2",
"@codetanzania/majifix-priority": "^1.4.3",
"@lykmapipo/express-common": "^0.9.2",
"async": "^2.6.1",
"chai": "^4.2.0",
"express": "^4.16.4",
"grunt": "^1.0.3",
"grunt-apidoc": "^0.11.0",
"grunt-contrib-jshint": "^2.0.0",
"grunt-contrib-watch": "^1.1.0",
"grunt-mocha-test": "^0.13.3",
"jshint-stylish": "^2.2.1",
"lodash": "^4.17.11",
"mocha": "^5.2.0",
"mongoose": "^5.2.17",
"moment": "^2.22.2",
"mongoose": "^5.3.4",
"mongoose-geojson-schemas": "^0.8.1",
"mongoose-locale-schema": "^0.2.1",
"mongoose-rest-actions": "^0.18.2",
"nodemon": "^1.18.4",
"sinon": "^6.3.4",
"randomcolor": "^0.5.3",
"sinon": "^7.0.0",
"sinon-chai": "^3.2.0",
"sinon-mongoose": "^2.2.1",
"supertest": "^3.3.0"
},
"dependencies": {
"@codetanzania/majifix-common": "^0.9.2",
"@codetanzania/majifix-jurisdiction": "^1.4.3",
"@codetanzania/majifix-priority": "^1.4.2",
"@lykmapipo/express-common": "^0.9.1",
"peerDependencies": {
"@codetanzania/majifix-common": "^0.11.1",
"@codetanzania/majifix-jurisdiction": "^1.5.2",
"@codetanzania/majifix-priority": "^1.4.3",
"@lykmapipo/express-common": "^0.9.2",
"async": "^2.6.1",
"express": "^4.16.3",
"express": "^4.16.4",
"lodash": "^4.17.11",
"moment": "^2.22.2",
"mongoose-locale-schema": "^0.2.0",
"mongoose-rest-actions": "^0.17.1",
"mongoose-geojson-schemas": "^0.8.1",
"mongoose-locale-schema": "^0.2.1",
"mongoose-rest-actions": "^0.18.2",
"randomcolor": "^0.5.3"
},
"engines": {
Expand Down
20 changes: 13 additions & 7 deletions test/integration/boostrap.spec.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,34 @@
'use strict';


process.env.NODE_ENV = 'test';


/* dependencies */
const mongoose = require('mongoose');
const MONGODB_URI = 'mongodb:https://localhost/majifix-service-group';


function wipe(done) {
/* clean and restore database */
const wipe = (done) => {
if (mongoose.connection && mongoose.connection.dropDatabase) {
mongoose.connection.dropDatabase(done);
} else {
done();
}
}
};


//setup database
before(function (done) {
mongoose.connect('mongodb:https://localhost/majifix-service-group', done);
/* setup database */
before((done) => {
const options = { useNewUrlParser: true };
mongoose.connect(MONGODB_URI, options, done);
});


// clear database
/* clear database */
before(wipe);


// clear database
/* clear database */
after(wipe);
4 changes: 2 additions & 2 deletions test/integration/http.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('ServiceGroup', function () {
describe('Rest API', function () {

before(function (done) {
ServiceGroup.remove(done);
ServiceGroup.deleteMany(done);
});

let servicegroup;
Expand Down Expand Up @@ -179,7 +179,7 @@ describe('ServiceGroup', function () {


after(function (done) {
ServiceGroup.remove(done);
ServiceGroup.deleteMany(done);
});

});
Expand Down
12 changes: 6 additions & 6 deletions test/integration/servicegroup.delete.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ describe('ServiceGroup', function () {
let priority;

before(function (done) {
Priority.remove(done);
Priority.deleteMany(done);
});

before(function (done) {
Jurisdiction.remove(done);
Jurisdiction.deleteMany(done);
});

before(function (done) {
Expand All @@ -38,7 +38,7 @@ describe('ServiceGroup', function () {


before(function (done) {
ServiceGroup.remove(done);
ServiceGroup.deleteMany(done);
});

describe('static delete', function () {
Expand Down Expand Up @@ -122,15 +122,15 @@ describe('ServiceGroup', function () {
});

after(function (done) {
ServiceGroup.remove(done);
ServiceGroup.deleteMany(done);
});

after(function (done) {
Priority.remove(done);
Priority.deleteMany(done);
});

after(function (done) {
Jurisdiction.remove(done);
Jurisdiction.deleteMany(done);
});

});
10 changes: 5 additions & 5 deletions test/integration/servicegroup.get.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('ServiceGroup', function () {
let jurisdiction;

before(function (done) {
Jurisdiction.remove(done);
Jurisdiction.deleteMany(done);
});

before(function (done) {
Expand All @@ -25,7 +25,7 @@ describe('ServiceGroup', function () {
});

before(function (done) {
ServiceGroup.remove(done);
ServiceGroup.deleteMany(done);
});

describe('get', function () {
Expand Down Expand Up @@ -158,11 +158,11 @@ describe('ServiceGroup', function () {
});

after(function (done) {
ServiceGroup.remove(done);
ServiceGroup.deleteMany(done);
});

after(function (done) {
Jurisdiction.remove(done);
Jurisdiction.deleteMany(done);
});

});
});
10 changes: 5 additions & 5 deletions test/integration/servicegroup.get_by_id.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('ServiceGroup', function () {
let jurisdiction;

before(function (done) {
Jurisdiction.remove(done);
Jurisdiction.deleteMany(done);
});

before(function (done) {
Expand All @@ -25,7 +25,7 @@ describe('ServiceGroup', function () {


before(function (done) {
ServiceGroup.remove(done);
ServiceGroup.deleteMany(done);
});

describe('get by id', function () {
Expand Down Expand Up @@ -108,11 +108,11 @@ describe('ServiceGroup', function () {
});

after(function (done) {
ServiceGroup.remove(done);
ServiceGroup.deleteMany(done);
});

after(function (done) {
Jurisdiction.remove(done);
Jurisdiction.deleteMany(done);
});

});
});
10 changes: 5 additions & 5 deletions test/integration/servicegroup.patch.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('ServiceGroup', function () {
let jurisdiction;

before(function (done) {
Jurisdiction.remove(done);
Jurisdiction.deleteMany(done);
});

before(function (done) {
Expand All @@ -23,7 +23,7 @@ describe('ServiceGroup', function () {
});

before(function (done) {
ServiceGroup.remove(done);
ServiceGroup.deleteMany(done);
});

describe('static patch', function () {
Expand Down Expand Up @@ -117,11 +117,11 @@ describe('ServiceGroup', function () {
});

after(function (done) {
ServiceGroup.remove(done);
ServiceGroup.deleteMany(done);
});

after(function (done) {
Jurisdiction.remove(done);
Jurisdiction.deleteMany(done);
});

});
});
10 changes: 5 additions & 5 deletions test/integration/servicegroup.post.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('ServiceGroup', function () {
let jurisdiction;

before(function (done) {
Jurisdiction.remove(done);
Jurisdiction.deleteMany(done);
});

before(function (done) {
Expand All @@ -23,7 +23,7 @@ describe('ServiceGroup', function () {
});

before(function (done) {
ServiceGroup.remove(done);
ServiceGroup.deleteMany(done);
});

describe('static post', function () {
Expand Down Expand Up @@ -77,11 +77,11 @@ describe('ServiceGroup', function () {
});

after(function (done) {
ServiceGroup.remove(done);
ServiceGroup.deleteMany(done);
});

after(function (done) {
Jurisdiction.remove(done);
Jurisdiction.deleteMany(done);
});

});
});
10 changes: 5 additions & 5 deletions test/integration/servicegroup.put.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('ServiceGroup', function () {
let jurisdiction;

before(function (done) {
Jurisdiction.remove(done);
Jurisdiction.deleteMany(done);
});

before(function (done) {
Expand All @@ -23,7 +23,7 @@ describe('ServiceGroup', function () {
});

before(function (done) {
ServiceGroup.remove(done);
ServiceGroup.deleteMany(done);
});

describe('static put', function () {
Expand Down Expand Up @@ -117,11 +117,11 @@ describe('ServiceGroup', function () {
});

after(function (done) {
ServiceGroup.remove(done);
ServiceGroup.deleteMany(done);
});

after(function (done) {
Jurisdiction.remove(done);
Jurisdiction.deleteMany(done);
});

});
});

0 comments on commit 1ace9f9

Please sign in to comment.