xref: /aosp_15_r20/external/libusb/tests/webusb-test-shim/index.js (revision 86b64dcb59b3a0b37502ecd56e119234366a6f7e)
1// It's not yet possible to automate actual Chrome's device selection, so
2// for now run automated tests via Node.js WebUSB implementation.
3//
4// It might differ from browser one, but should be enough to catch most obvious issues.
5
6const { WebUSB } = require('usb');
7
8globalThis.navigator = {
9  usb: new WebUSB({
10    allowAllDevices: true
11  })
12};
13