提交 32f31b10 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

follow sinon spy reset -> resetHistory

上级 05456cc2
......@@ -39,15 +39,15 @@ test('Node.js function params destructuring behaviour test', async t => {
paramSpy(n, s)
}
paramSpy.reset()
paramSpy.resetHistory()
paramTest()
t.deepEqual(paramSpy.args[0], [DEFAULT_N, DEFAULT_S], 'should be equal to default args')
paramSpy.reset()
paramSpy.resetHistory()
paramTest({n: 42})
t.deepEqual(paramSpy.args[0], [42, DEFAULT_S], 'should be equal to default s args')
paramSpy.reset()
paramSpy.resetHistory()
paramTest({s: 'life'})
t.deepEqual(paramSpy.args[0], [DEFAULT_N, 'life'], 'should be equal to default n args')
})
......@@ -58,7 +58,7 @@ test('retryPromise()', async t => {
})
t.true(thenSpy.withArgs(EXPECTED_REJECT).calledOnce, 'should got EXPECTED_REJECT when wait not enough')
thenSpy.reset()
thenSpy.resetHistory()
const anotherDelay50 = delayedFactory(50)
await retryPromise({ max: 6, backoff: 10 }, function() {
return anotherDelay50()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册