Labs/Jetpack/So You're Implementing a JEP: Difference between revisions

→‎Testing: Corrected more unload lies.
(→‎Unloading: Corrected inaccuracies, thanks Atul.)
(→‎Testing: Corrected more unload lies.)
Line 156: Line 156:
Your module should come with unit tests.
Your module should come with unit tests.


If you use the <tt>unload</tt> module to clean up resources you've created, you should test that those resources are actually cleaned up when your module is unloaded.  See the [http://mxr.mozilla.org/labs-central/source/jetpack-sdk/packages/jetpack-core/tests/test-xhr.js#32 XHR test] for an example of manually loading and unloading a module.
If you use the <tt>unload</tt> module to clean up resources you've created, you should test that those resources are actually cleaned up when your module receives the unload message.  See [[#Unloading]] above for details.


= Modularity =
= Modularity =
Confirmed users
764

edits