Skip to content

Releases: alonronin/mockingoose

Add support for Model.insertMany

19 Mar 01:54
b2864a7
Compare
Choose a tag to compare

Remove TypeScript, Support UpdateOne and UpdateMany

18 Mar 23:08
23312bb
Compare
Choose a tag to compare

I decided to remove typescript since changes in mongoose broke monckingoose without good reason.

now mockingoose works with latest version of mongoose.

closes #68

Update Dependencies

07 Jun 19:07
Compare
Choose a tag to compare
v2.13.1

:bookmark: 2.13.1

Using function to Mock, Convert to TypeScript

31 Mar 00:46
Compare
Choose a tag to compare

What a release we have, thanx @andreialecu for the great hard work and @stieg for his ideas and comments.

So now you can use a function as your mock.

Also we converted the project to TypeScript so you have now a better intellisense in your editor and of course strong typing and compile type checks.

Welcome @andreialecu as a collaborater!

Save Hook

24 Dec 13:12
Compare
Choose a tag to compare

Add support to Save Hook #45.

Thanx to @hirochachacha 👍

countDocuments and estimatedDocumentCount support

31 Oct 21:34
Compare
Choose a tag to compare

Thanx to @sepulvedablanco for PR #43 and #42 added 2 new operators.

Support Aggrregate

22 May 17:11
Compare
Choose a tag to compare

Now you can mock the Aggregate framework:

it('should aggregate with promise', () => {
  mockingoose.User.toReturn([{ _id: { accountId: '5aef17c3d7c488f401c101bd' } }], 'aggregate');

  return User
    .aggregate(
      [{
        '$group': {
          '_id': {
            'accountId': '$accountId'
          }
        }
      }])
    .then(result => {
      expect(result).toEqual([{ _id: { accountId: '5aef17c3d7c488f401c101bd' } }]);
    });
});

v2.10.0

22 May 11:09
Compare
Choose a tag to compare

This version is deprecated due to forgotten build. Use v2.10.1

Support Model.remove

13 Mar 17:43
Compare
Choose a tag to compare

support remove on Model instance. Thanx to @KevinRLeC on PR #24.

Support mongoose 5

13 Mar 17:31
Compare
Choose a tag to compare
  • Support mongoose 5
  • Remove mongoose.Promise for version 5