是否可以针对Sails.js中的模型使用Mocha框架? [英] Is it possible to use the Mocha Framework against a model in Sails.js?

查看:55
本文介绍了是否可以针对Sails.js中的模型使用Mocha框架?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Sails.js使用Node.js的MVC模式,我想知道Mocha是否可以挂接到测试模型上.

Sails.js uses the MVC pattern for Node.js and I was wondering if Mocha could be hooked up for testing Models.

推荐答案

我知道您之前曾问过这个问题,但是我一直在搜寻自己,目前没有太多东西.我想我会把我发现的东西丢进这个答案...

I know you asked this awhile ago, but I was searching around myself and there's not much out there at the moment. I figured I'd drop what I found into this answer...

我在帆github

I found some discussion on the sails github and a gist with some example code.

还有第二次讨论,其中包含更多示例.

There is also a second discussion with more examples.

这篇关于是否可以针对Sails.js中的模型使用Mocha框架?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆