diff --git a/test/main/signers/ledger/adapter.test.js b/test/main/signers/ledger/adapter.test.js index 62525592b..5d00b5515 100644 --- a/test/main/signers/ledger/adapter.test.js +++ b/test/main/signers/ledger/adapter.test.js @@ -1,8 +1,10 @@ +import os from 'os' +import log from 'electron-log' import HID from 'node-hid' +import usbDetect from 'usb-detection' + import LedgerSignerAdapter from '../../../../main/signers/ledger/adapter' import { Status } from '../../../../main/signers/ledger/Ledger' -import log from 'electron-log' -import usbDetect from 'usb-detection' jest.mock('node-hid') @@ -66,7 +68,11 @@ afterEach(() => { }) afterAll(() => { - usbDetect.stopMonitoring() + if (os.platform().toLowerCase() !== 'linux') { + // calling stopMonitoring() causes a segmentation fault on Linux + // https://github.com/MadLittleMods/node-usb-detection/issues/57 + usbDetect.stopMonitoring() + } jest.useRealTimers() log.transports.console.level = 'debug'