How to set timeout in a javascript unit test using sinon.useFakeTimers

后端 未结 0 1292
灰色年华
灰色年华 2021-01-06 07:18

I\'m trying to test the following method:

endSocketConn(socket) {
    if(!socket) {
        return;
    }

    socket.setTimeout(5000, () => {
        sock         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题