aws / aws/aws-cdk

(assertions): arrayWith should support unordered list

Open
#15,903 1 comment 3 reactions 0 assignees View on GitHub
@aws-cdk/assertions effort/medium feature-request p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

Currently, `arrayWith()` matcher expects the sublist to be in the same order as the target list.
Support unordered sublists.

### Use case

Specifically useful to use in properties that are arrays where the order is immaterial. The support will provide more stable testing capabilities.

---

This is a :rocket: Feature Request

Contributor guide

Open the contributing guide

Research direction

Start by locating the TypeScript implementation and tests for the `arrayWith()` matcher. Check how the matcher currently compares sublists, then define the unordered behavior for array properties while preserving the existing ordered behavior. Done means unordered sublists are accepted and covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.