parse-community / parse-community/parse-server
RestWrite.js auth and validation branches survive boolean negation under mutation testing
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 21.4k
- Forks
- 4.8k
- Avg merge
- 7h 45m
- Merged PRs (30d)
- 11
Description
New Feature / Enhancement Checklist
- Report security issues confidentially.
- Any contribution is under this license.
- Before posting search existing issues.
Current Limitation
While mutation-testing this repo (I'm building a tool in this space), I ran the jasmine suite (with a live mongod, 9.10.0-alpha.2 tree) against a 200-mutant sample. The suite killed 191 of 200, which is one of the strongest results I've measured, and every kill came from a real test failure.
All 9 survivors cluster in src/RestWrite.js, and all are boolean negations, meaning the guard can be inverted and the full suite still passes:
:549,:1910,:1914,:1918— the auth-provider handling branches. These four also survived an independent earlier sample, so they're stable gaps rather than sampling noise.:665,:699,:706,:868,:1457— validation and session-handling guards in the same file.
Each survivor was re-run against the entire suite to confirm it's a genuine gap rather than a targeting artifact.
Feature / Enhancement Description
RestWrite is a hot path, so a small set of tests exercising those branch outcomes (particularly the auth-provider chain around :1910-:1918) would close most of the file's mutation surface. Happy to share the exact mutants or turn any of these into a test PR if that's welcome. No action needed otherwise: 95.5% with survivors this localized is an excellent showing!
Example Use Case
- Invert one of the listed guards (for example the
:1910auth-provider branch). - Run the full jasmine suite.
- The suite passes, so a regression on that branch outcome would ship undetected.
Alternatives / Workarounds
None needed; this is a test-strength observation, not a product defect.
3rd Party References
n/a
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/RestWrite.js at the listed auth-provider branches around lines 1910-1918, then inspect the validation and session-handling guards at lines 549, 665, 699, 706, 868, and 1457. Add Jasmine coverage for the missing branch outcomes and run the full Jasmine suite with a live mongod. Done means boolean-negation mutants in these guards are killed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- backend, testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100