(assertions): Match.greaterThan() and Match.lessThan()
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Description
Looking for a suite of Matchers on numbers specifically.
### Use Case
It would be great to be able to do something like this:
```ts
const template = Template.fromStack(stack).resourceCountIs('Foo::Bar', Match.greaterThan(0));
```
### Proposed Solution
Something like: `Match.greaterThan(number: number)` and `Match.lessThan(number: number)`.
For now, the use case is only really for `Template.fromStack().resourceCountIs()`, I think.
### Other information
_No response_
### Acknowledge
- [X] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
Contributor guide
Research direction
Start by tracing the assertions Match API and Template.fromStack().resourceCountIs(), since the issue identifies those entry points. Check how existing matchers are tested, then add numeric greater-than and less-than matcher coverage and confirm the resourceCountIs() use case works as proposed.
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
- 42/100