rest icon indicating copy to clipboard operation
rest copied to clipboard

Tests Fail - bin_path is not a function

Open dmblack opened this issue 7 years ago • 4 comments

Debian Testing
node 8.2.1 (Tested 7-stable and 6-stable)
npm 5.3.0 (Tested with releases for 7 stable and 6 stable)

Unable to run tests with even a fresh yo rest deploy. Tests 'delay' fail approximately 2 seconds with error;

TypeError: bin_path is not a function
    at install (/home/<user>/Development/projects/node/<project>/node_modules/mongodb-prebuilt/index.js:158:20)
    at Object.start_server (/home/<user>/Development/projects/node/<project>/node_modules/mongodb-prebuilt/index.js:60:16)
    at /home/<user>/Development/projects/node/<project>/node_modules/mockgoose/Mockgoose.js:144:42
    at next (/home/<user>/Development/projects/node/<project>/node_modules/rimraf/rimraf.js:74:7)
    at CB (/home/<user>/Development/projects/node/<project>/node_modules/rimraf/rimraf.js:110:9)
    at FSReqWrap.oncomplete (/home/<user>/Development/projects/node/<project>/node_modules/rimraf/rimraf.js:229:7)

Looks to be an issue with mongodb-prebuilt, included with mockgoose. I've attempted updating, and downgrading, mockgoose. Manually managing mongodb-prebuilt - but cannot get tests passing.

dmblack avatar Jul 27 '17 02:07 dmblack

I see the same problem.

ezk84 avatar Aug 09 '17 14:08 ezk84

Same here! When I update the mockgoose, things will break... I haven't succeeded fixing it yet...

yxliang01 avatar Sep 05 '17 13:09 yxliang01

Dont update"mockgoose". It breaks the generator. In my project on production, we are using "mockgoose": "^6.0.8", and it works perfect, but it is impossible to update it to a newer version.

There is a PR that it was merged that it updates mockgoose to this version.

Regards

maustand avatar Nov 07 '17 08:11 maustand

Will attempt to test this tonight and confirm.

In the end I butchered my tests to somehow work with much frustration - and a little less confidence (Obviously; far from ideal.)

Thanks for your response @maustand

dmblack avatar Nov 08 '17 23:11 dmblack