我正在尝试为sequelize中的一个模型编写测试,但我不明白为什么它没有失败 it('should find user by id', (done) => { console.log(`something went wrong [should find user by id] ${err}`); })1 -__,------,
0 -__| &
我的package.json有什么问题吗?当我运行npm run test时,测试是绿色的。但是当我运行npm run dev时,测试也在运行。没有我写的命令config,当我运行npm run dev时,它应该运行test ? /node_modules/mocha/bin/mocha \"*/*.spec.js\"" "dependencies": {
&q
我想在mysql数据库上测试CRUD操作,使用Sequelize作为ORM和Mocha/Chai进行单元测试。我使用http路由测试了记录的插入/删除,但是我会直接测试模型,而不使用任何http连接。我试过这样做,但当我启动测试时,没有添加记录,也没有收到任何错误。app/model/article.js
module.exports = function