dubzzz / fast-check

Property based testing framework for JavaScript (like QuickCheck) written in TypeScript
https://fast-check.dev/
MIT License
4.36k stars 182 forks source link

Faster execution by proposing an alternative to barrel files #4324

Open dubzzz opened 1 year ago

dubzzz commented 1 year ago

🚀 Feature Request

About barrels:

Help to achieve our goal: https://github.com/gajus/eslint-plugin-canonical

How to measure the improvement? Our own test time before vs after. Hope we will have something noticeable.

dubzzz commented 1 year ago

I quickly assessed the idea against a naive test (one js spec file containing an empty test) running with Jest runner on one of my machines:

While the figures need to be re-assessed closely, there is definitely something to dig.

dubzzz commented 1 year ago

Such import strategy would require exports map in package.json to be fully supported both by node and tsc for TypeScript users. It would probably require me to select the right version range for my next major of fast-check so that this change will be feasible.