Closed
Bug 566051
Opened 15 years ago
Closed 15 years ago
test.makeSandboxedLoader() should accept a 'moduleOverrides' option
Categories
(Add-on SDK Graveyard :: General, defect)
Add-on SDK Graveyard
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: avarma, Unassigned)
References
Details
Attachments
(1 file, 1 obsolete file)
|
3.38 KB,
patch
|
Details | Diff | Splinter Review |
For the purpose of mocking/faking-out module dependencies in unit tests, it should be possible to pass-in a mapping from module names to exports as a 'moduleOverrides' option to text.makeSandboxedLoader().
| Reporter | ||
Comment 1•15 years ago
|
||
| Reporter | ||
Comment 2•15 years ago
|
||
I'm not super happy with this patch, though we can make it nicer later; we really ought to make it easier in general to provide module overrides, since the cuddlefish module does this itself, and we'd really like to do dependency injection via 'require' for other things.
Updated•15 years ago
|
OS: Mac OS X → All
Hardware: x86 → All
Version: unspecified → Trunk
Comment 3•15 years ago
|
||
While you're at it, please document makeSandboxedLoader()
http://hg.mozilla.org/labs/jetpack-sdk/file/tip/packages/jetpack-core/docs/unit-test.md
| Reporter | ||
Comment 4•15 years ago
|
||
| Reporter | ||
Updated•15 years ago
|
Attachment #445466 -
Attachment is obsolete: true
| Reporter | ||
Comment 5•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Comment 6•15 years ago
|
||
The Add-on SDK is no longer a Mozilla Labs experiment and has become a big enough project to warrant its own Bugzilla product, so the "Add-on SDK" product has been created for it, and I am moving its bugs to that product.
To filter bugmail related to this change, filter on the word "looptid".
Component: Jetpack SDK → General
Product: Mozilla Labs → Add-on SDK
QA Contact: jetpack-sdk → general
Version: Trunk → unspecified
You need to log in
before you can comment on or make changes to this bug.
Description
•