Naming
This commit is contained in:
@@ -146,7 +146,25 @@ describe('Robot.sendCommand & cmdReceivers', () => {
|
||||
|
||||
expect(r.callCount).toBe(1)
|
||||
|
||||
expect(logSpy).toHaveBeenCalled(1)
|
||||
//expect(logSpy).toHaveBeenCalled(2)
|
||||
logSpy.mockRestore()
|
||||
})
|
||||
|
||||
test('sendCommand multiple Receivers', () => {
|
||||
const logSpy = jest.spyOn(console, 'log').mockImplementation(() => {})
|
||||
|
||||
const r = new MockCmdReceiver()
|
||||
robot.cmdReceivers.push(r)
|
||||
const r2 = new MockCmdReceiver()
|
||||
robot.cmdReceivers.push(r2)
|
||||
|
||||
robot.sendCommand()
|
||||
|
||||
expect(r.callCount).toBe(1)
|
||||
expect(r2.callCount).toBe(1)
|
||||
|
||||
//console.log(logSpy)
|
||||
//expect(logSpy).toHaveBeenCalled(2)
|
||||
logSpy.mockRestore()
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user