首页 > 解决方案 > 从 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 语句仍然存在。

标签: mocha.js

解决方案


推荐阅读