-
Notifications
You must be signed in to change notification settings - Fork 83
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 all tests into separate files #227
Conversation
6055cfe
to
6da53b7
Compare
Beautiful. |
It's a shame that with this mode, it's no longer stand alone ( |
Right, though requiring a server shouldn't be a blocker for this. If you don't have or want to run a full-fledged server, there are also various ways to start a server from within your IDE. @Zefling Is that your only concern or do you have other feedback? Sebastian |
It's just an observation. Maybe write a note in the readme. No problem other than that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand re-exporting all the specs from one place (tests.js
) is convenient for legibility but i think this is far from being ideal from a performance point of view, because this means these 105 (!) imports are actually discovered by the browser after two consecutive subrequests: csstest.js
, and then tests.js
.
The easier way i see to improve that is to import the specs directly from csstest.js
.
Or we could preload some (all?) the files with <link rel="modulepreload">
, but the support for it is not great currently.
Side note: do we want to use spaces for indentation and CRLF line endings in this project now? 😅 I don't really care, but i would just prefer consistency across the project.
Importing the same module twice does not fire a separate HTTP request. Also, isn't the whole point of HTTP/2 that multiple HTTP requests are fine? 😄
Oof, let's not please. I must have missed that when reviewing the PR. |
I agree we should add
That's a mistake. My IDE wasn't set up correctly. I'll change the indentations back. Sebastian |
258f62a
to
a1a3f79
Compare
I've tested that now in Chrome 97 and Firefox 96 and didn't see any performance gain. Therefore I do not add them. @PolariTOON If you think we can somehow get a performance improvement by preloading resources, I suggest you open a separate issue and we'll discuss it there.
The indentation is fixed now. Sebastian |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The total number of features tested appears to have decreased, because the following specs are not exported by tests.js
:
[
"Box Sizing Level 3",
"Box Sizing Level 4",
"Custom Properties for Cascading Variables Level 1",
"Scoping Level 1",
"Scroll Anchoring Level 1",
"Scroll Snap Level 1",
"Scrollbars Level 1",
"Shadow Parts",
"Shapes Level 1",
"Shapes Level 2",
"Will Change Level 1",
"Writing Modes Level 3",
"Writing Modes Level 4"
]
If you think we can somehow get a performance improvement by preloading resources, I suggest you open a separate issue and we'll discuss it there.
Sure, I will open an issue about it; i don't want to block this PR because of that.
Also, I forgot to tell it above, but |
a1a3f79
to
d1a2fc9
Compare
Thank you for the hint! Line breaks should be Linux line endings all over the place now. Sebastian |
While splitting them they were also converted into ES modules.
Total fail by me. 😞 Thank you so much for checking! I've included them now. Sebastian |
d1a2fc9
to
43f4679
Compare
While splitting them they were also converted into ES modules.
This also came with some consequences. The
Array
prototype extensionstimes()
andand()
got removed and the tests that used them now include the complete arrays previously produced by those methods.Furthermore, the
ele()
function got replaced by Bliss'$()
function.I probably could have moved them into some kind of helper module, though I believe those functions aren't necessary.
I only turned the tests into modules in this change, as I focused on #219. Though other parts of the code should probably also be converted into modules (as part of #216).
This change will cause conflicts with the other PRs, so depending on which ones are merged first, some rebasing needs to happen.
This closes #219.
Sebastian