mongoose-db-populator:使用 mongoose 模型填充 MongoDB 数据库

时间:2021-06-13 12:15:50
【文件属性】:
文件名称:mongoose-db-populator:使用 mongoose 模型填充 MongoDB 数据库
文件大小:14KB
文件格式:ZIP
更新时间:2021-06-13 12:15:50
JavaScript 猫鼬数据库填充器 此模块有助于使用文档填充 MongoDB 以进行测试。 它还清理数据库(绝对是所有集合)。 describe ( 'models' , function ( ) { beforeEach ( function ( done ) { // you are responsible for the connection to mongodb instance!!! db . mongoose . connect ( 'mongodb://localhost:27017/mdp' , done ) ; } ) ; afterEach ( function ( done ) { // you are responsible for disconnection from mongodb instance!!
【文件预览】:
mongoose-db-populator-master
----Readme.md(3KB)
----Gruntfile.js(259B)
----src()
--------SuiteTest.js(12KB)
--------MongooseDbPopulator.js(979B)
--------MongooseDbPopulatorTest.js(5KB)
--------Suite.js(3KB)
----test()
--------integration()
--------support()
----.gitignore(531B)
----grunt()
--------jshint.js(248B)
--------index.js(68B)
--------mochaTest.js(160B)
--------watch.js(260B)
----package.json(900B)

网友评论