-
3 votesanswersviews
Objection.js Stubbing与Sinon链接的“whereIn”方法
尝试使用Sinon存根链接的knex查询 . 查询如下所示 const result = await TableModel .query() .whereIn('id', idList) .whereIn('value', valueList); 通常我使用一个我创建的辅助函数,它返回一个模型实例,每个方法都存根,返回 this ,就像这样 for (const method of ...