The final result will look like this:
spyOn(someObject, "someMethod").and.returnValue($q.resolve(someValue));
|
spyOn(someObject, "someMethod").and.returnValue($q.reject(someValue));
|
Steps:
- Create a table with one cell
- Select the cell
- Click Layout > Shading > black
- Paste or write your code example inside the cell
- Highlight the code
- Change font color to white
- Click Review > Language > Set proofing language
- Choose a language on the right that no-one on your team is likely to have installed
- Paint the strings, globals and keywords appropriately