UNPKG
lasercat-workshop
Version:
latest (1.3.1)
1.3.1
1.3.0
1.2.0
1.1.0
1.0.0
0.2.0
0.1.0
Cats & Lasers & johnny-five
github.com/tableflip/lasercat-workshop
tableflip/lasercat-workshop
lasercat-workshop
/
stubs
/
serialport-stub.js
14 lines
(9 loc)
•
267 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
var
sinon =
require
(
'sinon'
);
SerialPort
=
function
(
) { }
SerialPort
.
list
= sinon.
stub
();
SerialPort
.
list
.
callsArgWithAsync
(
0
,
null
, [{
// has to match the regex /usb|acm|^com/i
comName
:
"/dev/cu.usbserial-FAKEID"
}]);
module
.
exports
= sinon.
spy
(
SerialPort
);