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

idl_test is not mentioned in documentation for idlharness.js #19604

Closed
jdm opened this issue Oct 9, 2019 · 3 comments
Closed

idl_test is not mentioned in documentation for idlharness.js #19604

jdm opened this issue Oct 9, 2019 · 3 comments

Comments

@jdm
Copy link
Contributor

jdm commented Oct 9, 2019

https://web-platform-tests.org/writing-tests/idlharness.html describes various APIs, but not the ones used in actual tests like

['css-pseudo', 'cssom', 'uievents', 'SVG', 'html', 'dom'],
.

@Hexcles
Copy link
Member

Hexcles commented Jan 3, 2020

I ran into this today. @foolip IIRC you reviewed much of it. Would you be able to write some docs for it?

We do have some comments for this API though:

wpt/resources/idlharness.js

Lines 3196 to 3209 in 7c50c21

/**
* idl_test is a promise_test wrapper that handles the fetching of the IDL,
* avoiding repetitive boilerplate.
*
* @param {String|String[]} srcs Spec name(s) for source idl files (fetched from
* /interfaces/{name}.idl).
* @param {String|String[]} deps Spec name(s) for dependency idl files (fetched
* from /interfaces/{name}.idl). Order is important - dependencies from
* each source will only be included if they're already know to be a
* dependency (i.e. have already been seen).
* @param {Function} setup_func Function for extra setup of the idl_array, such
* as adding objects. Do not call idl_array.test() in the setup; it is
* called by this function (idl_test).
*/

@annevk
Copy link
Member

annevk commented Apr 26, 2021

I think I fixed most of this in e867131. Not sure if @foolip saw that or if there's something remaining?

@foolip
Copy link
Member

foolip commented Apr 26, 2021

I did miss that! https://web-platform-tests.org/writing-tests/idlharness.html#testing-idl-fragments looks great actually. I don't think the API is great, but the docs point out what to look out for regarding the order of dependencies.

@foolip foolip closed this as completed Apr 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants