We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d3d37e5 commit 6311c12Copy full SHA for 6311c12
node/test/unit/tessel.js
@@ -766,6 +766,32 @@ exports['Tessel.Port'] = {
766
767
test.done();
768
},
769
+
770
+ busProtocolClassWrappersAreConstructors: function(test) {
771
+ test.expect(6);
772
773
+ sandbox.stub(Tessel, 'I2C');
774
+ sandbox.stub(Tessel, 'SPI');
775
+ sandbox.stub(Tessel, 'UART');
776
777
+ var port = new Tessel.Port('B', '/foo/bar/baz', this.tessel);
778
779
+ test.doesNotThrow(() => {
780
+ new port.I2C(1);
781
+ });
782
783
+ new port.SPI({});
784
785
786
+ new port.UART({});
787
788
789
+ test.equal(Tessel.I2C.callCount, 1);
790
+ test.equal(Tessel.SPI.callCount, 1);
791
+ test.equal(Tessel.UART.callCount, 1);
792
793
+ test.done();
794
+ },
795
};
796
797
exports['Tessel.Port.prototype'] = {
0 commit comments