diff --git a/packages/insomnia-inso/src/cli.test.ts b/packages/insomnia-inso/src/cli.test.ts index 07d3acc31a8..557a24be5db 100644 --- a/packages/insomnia-inso/src/cli.test.ts +++ b/packages/insomnia-inso/src/cli.test.ts @@ -155,7 +155,8 @@ describe('inso dev bundle', () => { expect(firstReqLogPosition).toBeGreaterThanOrEqual(0); expect(secondReqLogPosition).toBeGreaterThanOrEqual(0); - expect(firstReqLogPosition < secondReqLogPosition).toBeTruthy; + + expect(secondReqLogPosition).toBeGreaterThan(firstReqLogPosition); }); }); }); diff --git a/packages/insomnia-inso/src/cli.ts b/packages/insomnia-inso/src/cli.ts index 58e89c3038e..89111ae91db 100644 --- a/packages/insomnia-inso/src/cli.ts +++ b/packages/insomnia-inso/src/cli.ts @@ -545,7 +545,7 @@ export const go = (args?: string[]) => { // sort requests if (options.item.length) { const requestOrder = new Map(); - options.item.forEach((reqId: string, order: number) => requestOrder.set(reqId, order)); + options.item.forEach((reqId: string, order: number) => requestOrder.set(reqId, order + 1)); requestsToRun = requestsToRun.sort((a, b) => (requestOrder.get(a._id) || requestsToRun.length) - (requestOrder.get(b._id) || requestsToRun.length)); }