This PR fixes #1 by only copying dom-testing-library to a puppeteer execution context if it doesn't already exist. This change improves performance significantly in my benchmarks.
base x 22.98 ops/sec ±9.53% (55 runs sampled)
latest x 586 ops/sec ±10.48% (58 runs sampled)
querySelector x 1,102 ops/sec ±12.93% (50 runs sampled)
Fastest is querySelector
It also adds the simple benchmark I used to validate the change improved performance.
Hello! 👋
This PR fixes #1 by only copying dom-testing-library to a puppeteer execution context if it doesn't already exist. This change improves performance significantly in my benchmarks.
It also adds the simple benchmark I used to validate the change improved performance.
Closes #1