molecuel / mongolastic

Mongolastic - Mongoose middleware for elasticsearch integration
MIT License
8 stars 4 forks source link

Most tests use incorrect syntax and will always pass #13

Open moooji opened 9 years ago

moooji commented 9 years ago

Most tests use an incorrect syntax like:

response['mongolastic-cat'].settings.index.should.be.an.object;

This will never be evaluated and ignored, since there is simply no function being called. It is the same as writing dog.bark;

The correct syntax should be: response['mongolastic-cat'].settings.index.should.be.an.Object();

http://shouldjs.github.io/#assertion-function

I am updating the tests already and will send a PR, but some of them fail now, which means there will be some additional fixes be needed.

DominicBoettger commented 9 years ago

Thanks for your feedback!

Don't hesitate to send a PR :-)

moooji notifications@github.com schrieb am Mi., 2. Sep. 2015 um 20:34 Uhr:

Most test use an incorrect syntax like:

response['mongolastic-cat'].settings.index.should.be.an.object;

This will never be evaluated and ignored, since there is simply no function being called. It is the same as writing dog.bark;

The correct syntax should be: response['mongolastic-cat'].settings.index.should.be.an.Object();

http://shouldjs.github.io/#assertion-function

I am updating the tests already and will send a PR, but some of them fail now, which means there will be some additional fixes be needed.

— Reply to this email directly or view it on GitHub https://github.com/molecuel/mongolastic/issues/13.

Dominic Böttger

Dominic.Boettger@inspirationlabs.com


INSPIRATIONlabs GmbH

Rohrbacher Str. 79 | D-69115 Heidelberg | Germany Tel. +49-6221-9853-680

inspirationlabs.com

Sitz der Gesellschaft: Heidelberg Handelsregister: Amtsgericht Mannheim, HRB 704782

moooji commented 9 years ago

Here comes the PR https://github.com/molecuel/mongolastic/pull/14

There are two breaking changes: