Testing Mongoose Node.JS app

前端 未结 3 870
甜味超标
甜味超标 2021-02-07 10:53

I\'m trying to write unit tests for parts of my Node app. I\'m using Mongoose for my ORM.

I\'ve searched a bunch for how to do testing with Mongoose and Node but not com

3条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-07 11:48

    Also worth mentioning:
    mockgoose - In-memory DB that mocks Mongoose, for testing purposes.
    monckoose - Similar, but takes a different approach (Implements a fake driver). Monckoose seems to be unpublished as of March 2015.

提交回复
热议问题