leobalter / leobalter/DexterJS

Clarify fakeXHR documentation

Open
#23 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
56
Forks
9
PR merge metrics
No merged PRs in 30d

Description

Regarding @spectras comment on #22, we can improve our fakeXHR documentation.

Here are some gotchas that might find their way into the documentation by the way:

  • I added fakeXHR.requests = [] to my QUnit module's setup to ensure my tests are independent. Otherwise, I might end up responding to requests from another testcase. If fakeXHR.requests is considered as an internal api, maybe it would be useful to add an accessor method?
  • I use requireJS:
    • I looked for fakeXHR for a while before I realized I had to add it as a requirement (define(['fakeXHR', 'dexter', ...] function (fakeXHR, dexter, ...) {).
    • to have fakeXHR work fine it needs a fakeXHR: "dexter" entry in the path configuration so it knows it is loaded from the same file as dexter.
    • apart from that, dexterjs plays surprinsingly well with requireJS.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the fakeXHR documentation and the RequireJS usage examples referenced in the issue. Document request-state isolation, the fakeXHR dependency and path configuration, and what is already known about the internal requests API; done means these gotchas are clearly covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation, testing
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.