Skip to content

Conversation

seriousme
Copy link
Contributor

This PR adds additional patterns with multiple wildcards to match on retained messages to the test suite in abstract.js
It aims to prevent regressions on moscajs/aedes-persistence-redis#123

Kind regards,
Hans

Comment on lines +125 to +138
test('look up retained messages with a + as first element', async t => {
t.plan(1)
await matchRetainedWithPattern(t, '+/world')
})

test('look up retained messages with +/#', async t => {
t.plan(1)
await matchRetainedWithPattern(t, '+/#')
})

test('look up retained messages with a + and # pattern with some in between', async t => {
t.plan(1)
await matchRetainedWithPattern(t, 'hello/+/world/#', { topic: 'hello/there/world/creatures' })
})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this also test passing an array of patterns?

@robertsLando robertsLando merged commit 2d69505 into main May 22, 2025
6 checks passed
@robertsLando robertsLando deleted the added-abstract-patterns branch May 22, 2025 09:08
@robertsLando
Copy link
Member

Minor release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants