-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add GET_PROTOCOL_PARAMETERS #272
Conversation
test(fixture.testName, async () => { | ||
const ws = getWebSocketClient(); | ||
const { cost_models, ...data } = await ws.sendAndWait('GET_PROTOCOL_PARAMETERS'); | ||
expect(data).toMatchObject(fixture.result); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expect(data).toMatchObject(fixture.result); | |
expect(data).toStrictEqual(fixture.result); |
I prefer using toStrictEqual
in this case. The fixture could be missing some data (as it is now missing cost_models
) which could go unnoticed with a less strict assertion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c9ce170 should solve this
PlutusV2: expect.arrayContaining([expect.any(Number)]), | ||
PlutusV3: expect.arrayContaining([expect.any(Number)]), | ||
}, | ||
price_mem: 0.0577, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing cost_models
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't able to find a way to describe the cost_models
object with combinations of expect
s: the object is explicitly checked in the test file.
c9ce170 should solve this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's begin with the strictest version and gradually relax the requirements if needed.
I added checking whole cost_models
d976784
75c3a44
to
c9ce170
Compare
This should solve #254