import nrfdlModule, { Device, // @ts-ignore nrfdlModule Is not a module } from '../../../index'; import { PROGRAMMER_APP_FILTERS, RELEASE_DIR } from './common/config'; require('../../../jasmine_shared.js'); /** * Note: requires PPK1 * TODO: cover cases from https://github.com/NordicSemiconductor/pc-nrfconnect-ppk/blob/60bdbcb5c3d74b9215cba6f239519ee066449b74/src/device/rttDevice.ts * Test API: * - () * * Test Schema: * - */ xdescribe('[RTT operations]: ', () => { jasmine.DEFAULT_TIMEOUT_INTERVAL = 20000; const WAIT_FOR_START = 6000; // in ms; const is from ppk app let context = 0; const allDevices: Device[] = []; beforeAll(async () => { context = nrfdlModule.createContext({ plugins_dir: RELEASE_DIR }); const devices: Device[] = await nrfdlModule.enumerate(context, PROGRAMMER_APP_FILTERS); allDevices.push(...devices); }); it('Test rttStart()', async () => { expect(allDevices.length).toBeGreaterThan(0); const devicePromises = allDevices.map(async dev => { await nrfdlModule.rttStart(context, dev.id, WAIT_FOR_START); }); await Promise.all(devicePromises); }); });