Skip to content
#

sinon

Here are 212 public repositories matching this topic...

sinon
rensbaardman
rensbaardman commented Sep 19, 2019

Describe the bug
When the (string) representations of the expected outcome and the actual outcome of e.g. assert.calledWith() are equal, the resulting error message is very confusing and hinting at a bug in the display logic. Instead of <red>actual</red> <green>expected</green> (with <color>...</color> my attempt at showing the expected terminal output color), it displays `actual

pigcan
pigcan commented Apr 9, 2018

Ref: https://gitmoji.carloscuesta.me/

如上这个 emoji commit message 指引感觉非常好,所以大致翻译了下和大家分享

出发点源于最近在梳理和制定一套标准化且规范化开发细则,其中如何管理 commit 就是其中很重要的一个环节

借鉴了 angular 开发的规范,目前也是比较大规模使用的。

在指引文档中其中有一点涉及

Subject
The subject contains succinct description of the change:

  • use the imperative, present ten
git
RuudVerhoef
RuudVerhoef commented Nov 12, 2019

The following is still part of the readme.md:

Just mock and expects as usual and use chain to expects the chained methods. Finally call resolves or rejects (remember to require sinon-as-promised).

However (going there):
Sinon 2 added resolves and rejects methods and no longer requires this library.

jonathan-benn
jonathan-benn commented Feb 2, 2018
import sinon
import os
os.system("cd") # returns 0
stub = sinon.stub(os, "system").returns(5)
os.system("cd") # returns 5
stub.callCount # returns 1
stub.reset()
stub.callCount # returns 0
os.system("cd") # returns 0, which is wrong! should return None
stub.returns(5)
os.system("cd") # returns 0, which is wrong! should return 5
bug

Improve this page

Add a description, image, and links to the sinon topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the sinon topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.