Document how to use `add_setup` in tests
Categories
(Testing :: Mochitest, enhancement)
Tracking
(Not tracked)
People
(Reporter: mathew.hodson, Unassigned)
References
Details
The new add_setup
method and the proper way to use it should be documented somewhere on https://firefox-source-docs.mozilla.org/.
Reporter | ||
Comment 1•2 years ago
|
||
I see this page https://firefox-source-docs.mozilla.org/testing/xpcshell/index.html
That documents add_task
and registerCleanupFunction
, but it's specifcally about xpcshell tests. Can the the new add_setup
be used in xpcshell tests?
Comment 2•2 years ago
•
|
||
(In reply to Mathew Hodson from comment #1)
I see this page https://firefox-source-docs.mozilla.org/testing/xpcshell/index.html
That documents
add_task
andregisterCleanupFunction
, but it's specifcally about xpcshell tests. Can the the newadd_setup
be used in xpcshell tests?
No, it is specific to browser chrome tests, at least right now - sadly all our frameworks (mochitest plain, browser and xpcshell) have their own add_task
implementation (and would need their own add_setup
implementation). As far as I know the main mochitest/browser documentation that used to exist on MDN is still not migrated to fx-source-docs, and I think doing that is probably more pressing than documenting add_setup
.
Comment 3•2 years ago
|
||
(In reply to :Gijs (he/him) from comment #2)
As far as I know the main mochitest/browser documentation that used to exist on MDN is still not migrated to fx-source-docs, and I think doing that is probably more pressing than documenting add_setup
.
See bug 1740033. The old mochitest docs are in the MDN archive
Reporter | ||
Updated•2 years ago
|
Description
•