mswjs / data

Data modeling and relation library for testing JavaScript applications.
https://npm.im/@mswjs/data
MIT License
829 stars 52 forks source link

Decide on performance testing #118

Closed kettanaito closed 3 years ago

kettanaito commented 3 years ago

The current state of the performance testing is left to be desired.

FAIL test/performance/performance.test.ts
  ● creates a 1000 records in under 100ms

    expect(received).toBeLessThanOrEqual(expected)

    Expected: <= 350
    Received:    565.461743

      18 |   })
      19 | 
    > 20 |   expect(createPerformance.duration).toBeLessThanOrEqual(350)

I like the intention to have some performance regression metrics, but as long as it's reliable. If there's no way to make it such, I'd much prefer these tests to be removed (or skipped).

kettanaito commented 3 years ago

I'd much prefer performance tests to report in a separate thread to visually see how certain changes affect performance. There is no need to automatically fail the build, as in not treat performance results as any subject to passing/failing a test.