|
|
| Line 58: |
Line 58: |
| * Make sure all tests have 1 newline EOF | | * Make sure all tests have 1 newline EOF |
| * Make sure all lines of code respect the 2-space indent rule | | * Make sure all lines of code respect the 2-space indent rule |
|
| |
| == To be Added ==
| |
|
| |
| 13. Component declarations should be indented in line with the parent
| |
| 15. Use waitFor() as much as possible. Only use sleep() when a waitFor() inappropriate or impossible
| |
| *16,17. DELAY/TIMEOUT
| |
| - if 100/5000, remove
| |
| - sleep() use a global const
| |
| - other values use a global const
| |
| * for refactoring only, not in style guide
| |
| 18/19 - leave out of style guide
| |
| * not needed in refactor
| |
| 20. Dont use for each() in arrays - strings use traditional for()
| |
| * 21. no testGeneral subfolder
| |
| * refactoring only
| |
| 22. Only one test per file
| |
| - ok for style guide, ignore for refactoring
| |
| 23. Element before action
| |
| 24. Local test pages encapsulated in Array
| |
| 25. Constants between requires and setupModule()
| |
| - MPL > REQ > CONST > SETUP > TEARDOWN > TEST
| |
| - put into a template
| |
| 27. Use waitFor() when asserting for timeouts
| |
| - leave out of style guide for now
| |
| - refactoring: replace waitForEval() if failing
| |
| 28. Use traditional for() when iterating characters of a string
| |
| 29. License block
| |
| - Initial Author: community member (Employee: Mozilla Foundation)
| |
| - Everyone in contributor
| |
| - contributor list in order of contribution
| |
| 31. waitFor() & assert() error messages
| |
| * refactor: ensure messages are positive
| |
| - style guide: generally mention that error messages should be positive
| |
| 32. Trailing whitespace
| |
| - no trailing whitespace on a line
| |
| - 2-space indent in general
| |
| - 1 newline at EOF
| |
|
| |
| * Please use good coding practice
| |
| * Reference http://neil.rashbrook.org/JS.htm
| |
| * Point is clear code
| |
| * If style guide is "wrong", be prepared to explain why
| |
| * Style guide is modular and modifiable
| |