Closed
Bug 1390077
Opened 7 years ago
Closed 7 years ago
Doc: Append new Console API stubs
Categories
(DevTools :: Console, enhancement)
DevTools
Console
Tracking
(firefox57 fixed)
RESOLVED
FIXED
Firefox 57
Tracking | Status | |
---|---|---|
firefox57 | --- | fixed |
People
(Reporter: Honza, Assigned: Honza)
Details
Attachments
(1 file)
I mentioned this last week. It would be nice to have a short readme file describing how to generate new stubs for Console tests...
Comment hidden (mozreview-request) |
Assignee | ||
Comment 2•7 years ago
|
||
Comment on attachment 8896920 [details] Bug 1390077 - Add readme about stubs generator instructions; @Nicolas, what do you think what should be added yet. I can imagine that we might want to update other places with doc, but for now I am just thinking about a quick and simple readme file available directly in the source dir. Honza
Attachment #8896920 -
Flags: feedback?(nchevobbe)
Comment 3•7 years ago
|
||
mozreview-review |
Comment on attachment 8896920 [details] Bug 1390077 - Add readme about stubs generator instructions; https://reviewboard.mozilla.org/r/168196/#review173376 Thanks Honza for doing this. Looks good overall, only have a couple of comments ::: devtools/client/webconsole/new-console-output/test/README.md:6 (Diff revision 1) > +* Enzyme - [Enzyme](http://airbnb.io/enzyme/) is a JavaScript Testing utility for React that makes it easier to assert, manipulate, and traverse your React Components' output. > + > +The team is leaning towards Enzyme since it's well known and suitable for React. > +It's also easier to contribute to tests written on top of Enzyme. We should mention mocha too. I think mocha is the test runner, and Enzyme a utility ::: devtools/client/webconsole/new-console-output/test/README.md:12 (Diff revision 1) > + > +The team is leaning towards Enzyme since it's well known and suitable for React. > +It's also easier to contribute to tests written on top of Enzyme. > + > +# Stubs > +Many tests depends on fix data structures (aka stubs) that mimic RDP packets maybe wrap RDP in <abbr> with a title for what it stands for. ::: devtools/client/webconsole/new-console-output/test/README.md:16 (Diff revision 1) > +## Append new Console API stubs > +See how to generate new stubs for Console API calls. > + > +* Append new entry into `consoleApiCommands` array. The array is defined in this module: > +`\test\fixtures\stub-generators\stub-snippets.js` > +* Generate stubs with existing mochitest: > +`\test\fixtures\stub-generators\browser_webconsole_check_stubs_console_api.js` > + > +Run the generator using `mach` command. > +`./mach test browser_webconsole_check_stubs_console_api.js` Looks good, we should have the same for all the types (evaluation results, commands, network, …) ::: devtools/client/webconsole/new-console-output/test/README.md:22 (Diff revision 1) > +See how to generate new stubs for Console API calls. > + > +* Append new entry into `consoleApiCommands` array. The array is defined in this module: > +`\test\fixtures\stub-generators\stub-snippets.js` > +* Generate stubs with existing mochitest: > +`\test\fixtures\stub-generators\browser_webconsole_check_stubs_console_api.js` we should put the entire command maybe : ./mach test devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/browser_webconsole_check_stubs_console_api.js
Updated•7 years ago
|
Attachment #8896920 -
Flags: feedback?(nchevobbe) → feedback+
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 6•7 years ago
|
||
(In reply to Nicolas Chevobbe [:nchevobbe] from comment #3) Thanks for the review. All comments resolved. Honza
Comment hidden (mozreview-request) |
Comment 8•7 years ago
|
||
mozreview-review |
Comment on attachment 8896920 [details] Bug 1390077 - Add readme about stubs generator instructions; https://reviewboard.mozilla.org/r/168196/#review174366
Attachment #8896920 -
Flags: review?(nchevobbe) → review+
Pushed by jodvarko@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c7f8cb484807 Add readme about stubs generator instructions; r=nchevobbe
Comment 10•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c7f8cb484807
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 57
Updated•6 years ago
|
Product: Firefox → DevTools
Updated•6 years ago
|
Assignee: nobody → odvarko
You need to log in
before you can comment on or make changes to this bug.
Description
•