LeaVerou / css3test

How does your browser score for its CSS3 support?
http://css3test.com
MIT License
214 stars 83 forks source link

Split tests into several files #219

Closed SebastianZ closed 2 years ago

SebastianZ commented 2 years ago

tests.js became quite huge over time and gets bigger with every new specification added.

To make it easier to find the tests for a spec., add new ones, and avoid conflicts between edits, the test.js file should be split up into individual files. Each spec. should be placed in its own file and be included in index.html.

Sebastian

LeaVerou commented 2 years ago

Once we rewrite to ESM (rel #216), we can just split them into individual modules, and tests.js can import them all.

PolariTOON commented 2 years ago

I agree splitting the tests into several files, possibly ES modules, would be useful to make maintainance easier. This would also heavily increase the number of requests made to load all the tests, but also to incrementally load them by importing them dynamically without waiting for the whole testbase to be fetched and parsed. So the impact on performance have to be considered.

I was also thinking about converting the tests to one or multiple JSON files, so i opened #224 for discussing that, but a current limitation is that they could not be imported statically.