QUnit.dump.parse returns an empty object for Maps
Open
Nobody has claimed this yet.
Component: Dump
Component: HTML Reporter
Type: Bug
- Dominant language
- JavaScript
- Stars
- 4k
- Forks
- 773
- PR merge metrics
- No merged PRs in 30d
Description
Version: 2.20.1
Test browser: Chrome 141.0.7390.55
Test cases:
> QUnit.dump.parse([1,3,4])
'[\n 1,\n 3,\n 4\n]'
^^ looks reasonable.
> QUnit.dump.parse({foo: "bar", baz: 2})
'{\n "baz": 2,\n "foo": "bar"\n}'
^^ likewise.
> QUnit.dump.parse(new Map([["a","b"], ["c","d"]]))
'{}'
^^ feels like a bug.
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
Search the QUnit.dump.parse implementation and its existing tests, then reproduce the Map case shown in the report. Add a regression test covering Map entries and update the behavior so the result represents the provided key-value pairs; the issue is done when the regression test passes in Chrome and the existing array and object cases remain unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100