Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split tests into several files #219

Closed
SebastianZ opened this issue Jan 7, 2022 · 2 comments · Fixed by #227
Closed

Split tests into several files #219

SebastianZ opened this issue Jan 7, 2022 · 2 comments · Fixed by #227
Labels

Comments

@SebastianZ
Copy link
Collaborator

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
Copy link
Owner

LeaVerou commented Jan 8, 2022

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

@PolariTOON
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants