The document said that no optional attributes supp...
# pact-js
t
The document said that no optional attributes supported https://docs.pact.io/faq#why-is-there-no-support-for-specifying-optional-attributes But in pact-js, I can simply don't use
eachLike
directly, instead copying it code and use it like this:
Copy code
children: {
    value: [uuid(child)],
    getValue: () => [uuid(child)],
    'pact:matcher:type': 'type',
    min: 0,
}
And ffi library happy to create the pact. At provider side, response can contain
"children": []
and the verification still passed. Is it a bug? Should ffi library prevent to set
min = 0
at the first place? Related to this question https://pact-foundation.slack.com/archives/C9VBGLUM9/p1690472580471449 (example code are there)
🤔 1
m
Probably!
t
I think it's the similar bug as above. So I created the bug report here https://github.com/pact-foundation/pact-reference/issues/304
👍 1