Revision 614c1ccac5f885e58444fe74a2aedd120d2ca73f authored by Marcos Cáceres on 21 August 2018, 05:04:44 UTC, committed by GitHub on 21 August 2018, 05:04:44 UTC
1 parent 4797b9c
usbIsochronousOutTransferPacket.https.any.js
'use strict';
test(t => {
let packet = new USBIsochronousOutTransferPacket('ok', 42);
assert_equals(packet.status, 'ok');
assert_equals(packet.bytesWritten, 42);
packet = new USBIsochronousOutTransferPacket('stall');
assert_equals(packet.status, 'stall');
assert_equals(packet.bytesWritten, 0);
}, 'Can construct USBIsochronousOutTransferPacket');
test(t => {
assert_throws(TypeError(), () => {
new USBIsochronousOutTransferPacket('invalid_status');
});
}, 'Cannot construct USBIsochronousOutTransferPacket with an invalid status');
test(t => {
assert_throws(TypeError(), () => new USBIsochronousOutTransferPacket());
}, 'Cannot construct USBIsochronousOutTransferPacket without a status');
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...