Open razvanc92 opened 7 years ago
@razvanc92 did you see the unit tests are failing?
1) Mongration.Migration "before each" hook:
Uncaught TypeError: Cannot read property 'pass' of undefined
at MongoConnection.<anonymous> (src/utils/mongo-connection.js:26:24)
at node_modules/mongodb/lib/mongo_client.js:406:11
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
Since options
is not required, if(this.options.pass || this.options.user)
will trigger that undefined
on mongo-connection:26.
@eberhara I fixed the error. If you have any other comments/recommendations just let me know.
Added options when creating the Mongo connection and if user/pass is provided then it will auth.