toInclude doesn't work with Map object
Open
Nobody has claimed this yet.
enhancement
help wanted
question
- Dominant language
- JavaScript
- Stars
- 2.3k
- Forks
- 115
- PR merge metrics
- No merged PRs in 30d
Description
Example:
it('toInclude should work for Maps', () => {
const obj = { a: 'a', b: 'b', c: 'c' };
const map = new Map();
Object.keys(obj).forEach(k => {
map.set(k, obj[k]);
});
expect(map).toInclude({ b: 'b' });
});
Error: Expected Map (3) {'a' => 'a', 'b' => 'b', 'c' => 'c'} to include { b: 'b' }
Contributor guide
No contributing guide indexed for this repository
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 by reproducing the provided toInclude example with a JavaScript Map and inspect the toInclude matcher and its existing tests. Done means the assertion accepts a Map containing the expected key-value pair while preserving current behavior for other supported values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100