jbdemonte / mongoose-elasticsearch-xp

A mongoose plugin that indexes models into Elasticsearch 2 / 5 / 6 and 7
92 stars 33 forks source link

Some styling #12

Closed nodkz closed 7 years ago

nodkz commented 7 years ago

chore(packages): Add eslint, prettier and yarn.lock. Remove jshint. style(prettier): Apply prettier on all js files

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 92.824% when pulling 03b47ba9fc31dd577486cee85c139dd683f2af54 on nodkz:prettier into af73e7abf925c92e0636556f99a023a958e294d1 on jbdemonte:master.

nodkz commented 7 years ago

Update mocha till 3.2.0 in https://github.com/jbdemonte/mongoose-elasticsearch-xp/pull/12/commits/d80f51ac5768c5784d2fee0ca6d60949bcfc2b4f Now it handle Promise, when test returns it.

BEFORE:

it('should handle a lucene query', function(done) {         
   var self = this;           
   self.model       
     .esCount('name:jane')         
     .then(function(result) {        
       expect(result.count).to.eql(1);      
       done();      
     })     
     .catch(function(err) {     
       done(err);       
     });        
  });

AFTER:

it('should handle a lucene query', function() {
  var self = this;
  return self.model
    .esCount('name:jane')
    .then(function(result) {
      expect(result.count).to.eql(1);
    });
});
coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 92.824% when pulling d80f51ac5768c5784d2fee0ca6d60949bcfc2b4f on nodkz:prettier into af73e7abf925c92e0636556f99a023a958e294d1 on jbdemonte:master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 92.824% when pulling d80f51ac5768c5784d2fee0ca6d60949bcfc2b4f on nodkz:prettier into af73e7abf925c92e0636556f99a023a958e294d1 on jbdemonte:master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 92.824% when pulling d80f51ac5768c5784d2fee0ca6d60949bcfc2b4f on nodkz:prettier into af73e7abf925c92e0636556f99a023a958e294d1 on jbdemonte:master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 92.824% when pulling d80f51ac5768c5784d2fee0ca6d60949bcfc2b4f on nodkz:prettier into af73e7abf925c92e0636556f99a023a958e294d1 on jbdemonte:master.

nodkz commented 7 years ago

Added commands npm run docker-v5 and npm run docker-v2 for creation docker images and starting them for testing purposes. In 1st terminal run npm run docker-v5 wait while elastic will be ready accept connections. After that in the 2nd terminal you may run tests.

Also removed timeout(5000) in tests and add -t 10000 in package.json for all tests. Had failed tests due timeout with slow work of docker container.

Tomorrow I try to see what exactly failed in TravisCI and fix these problems. Today Travis has DB problems and does not show test logs 😰.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.5%) to 92.361% when pulling ed5bdfe9f9847412b8ba41972d0ae0ff576ef2ee on nodkz:prettier into af73e7abf925c92e0636556f99a023a958e294d1 on jbdemonte:master.

nodkz commented 7 years ago

It's done! All tests migrated to ES6 with Node 4 support.