Skip to content

Commit

Permalink
Add sequence util
Browse files Browse the repository at this point in the history
  • Loading branch information
WunderBart committed Feb 28, 2023
1 parent 3781e85 commit 10d7c04
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/e2e-tests/specs/performance/site-editor.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ import {

jest.setTimeout( 1000000 );

const sequence = ( start, length ) =>
Array.from( { length }, ( _, i ) => i + start );

const results = {
serverResponse: [],
firstPaint: [],
Expand Down Expand Up @@ -101,10 +104,7 @@ describe( 'Site Editor Performance', () => {
// Having at least one helps ensure that caching quirks don't manifest
// in the results.
const throwaway = 1;
const iterations = Array.from(
{ length: samples + throwaway },
( _, i ) => i + 1
);
const iterations = sequence( 1, samples + throwaway );

it.each( iterations )(
`trace large post loading durations (%i of ${ iterations.length })`,
Expand Down

0 comments on commit 10d7c04

Please sign in to comment.