mocha.js - 从 Mocha 测试的报告输出中删除已执行的 SQL 查询
问题描述
这是记者的输出:
Mitchs-MacBook-Pro:tshirtShop Bugzy$ mocha --exit test/models/product-db.js
sequelize deprecated String based operators are now deprecated. Please use Symbol based operators for better security, read more at http://docs.sequelizejs.com/manual/tutorial/querying.html#operators node_modules/sequelize/lib/sequelize.js:242:13
Product to DB
Executing (default): INSERT INTO `product` (`product_id`,`name`,`description`,`price`,`discounted_price`,`image`,`image_2`,`thumbnail`,`display`) VALUES (DEFAULT,'BLah BLah','\"The Fur Merchants\". Not all the beautiful stained glass in the great cathedrals depicts saints and angels! Lay aside your furs for the summer and wear this beautiful T-shirt!','22.95','17.95','chartres-cathedral.gif','chartres-cathedral-2.gif','chartres-cathedral-thumbnail.gif',1);
ALl properties created corretly
✓ can create a new Product and save it to the db (832ms)
Executing (default): SELECT `product_id`, `name`, `description`, `price`, `discounted_price`, `image`, `image_2`, `thumbnail`, `display` FROM `product` AS `Product` WHERE `Product`.`product_id` = 1;
✓ can find the first record (77ms)
Not-nullable properties give the proper validation errors
✓ Error thrown for name
✓ Error thrown for description
✓ Error thrown for price
✓ Error thrown for discounted_price
✓ Error thrown for display
7 passing (932ms)
我想摆脱执行(默认)语句。我已经浏览了所有报告选项,但 SQL 语句仍然存在。
解决方案
推荐阅读
- java - FileChannel.position() 线程安全吗?
- laravel - Eloquent GroupBy 与 hasManyThrough 关系
- javascript - Retrieving users in a certain role
- assembly - 监控 CLFLUSH 汇编指令
- ruby-on-rails - Rails validations - cutom messages are not applied
- dynamics-crm - How is a Segment different from Marketing List? What is their purpose?
- python - 椭圆区域的网格/点阵/矩阵
- android - Weird issue with local notification on Oreo
- scala - 如何使用精炼库根据彼此类型的类定义 A 和 B?
- javascript - jQuery添加类在某些移动设备上不起作用