-
Notifications
You must be signed in to change notification settings - Fork 9
Conversation
🦋 Changeset detectedLatest commit: e755787 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
TBDocs Report 🛑 Errors: 0 @tbdex/protocol
@tbdex/http-client
@tbdex/http-server
TBDocs Report Updated at 2024-02-13T17:54:29Z |
d49e4fc
to
8a5ee23
Compare
8a5ee23
to
ced180a
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #168 +/- ##
==========================================
+ Coverage 85.55% 89.13% +3.58%
==========================================
Files 35 36 +1
Lines 2803 2871 +68
Branches 234 268 +34
==========================================
+ Hits 2398 2559 +161
+ Misses 405 312 -93
|
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.
amajing
it('adds an Rfq', async () => { | ||
const aliceDid = await DevTools.createDid() | ||
const pfiDid = await DevTools.createDid() | ||
const rfq = Rfq.create({ |
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 think we have devtool methods to create messages
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.
is it possible to have a top level beforeEach()
where the messages are defined for each nested describe()
tests? then you don't have to repeat them for each nested describe()
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.
The devtool methods are useful for creating a message with any random metadata, but it's more concise to use the .create()
methods in this case so we can specify to
, from
, and exchangeId
.
I updated beforeEach()
according to your suggestion.
exchangeId : rfq.metadata.exchangeId, | ||
}, | ||
data: { | ||
reason: 'I dont like u anymore' |
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.
😢
} | ||
} | ||
}) | ||
|
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 think this test is checking for the messages we can't add after rfq
- could we have similar "negative" tests for quote, order, orderstatus, and close?
i.e.
- quote:
cannot add orderstatus after quote
- order:
cannot add rfq or quote after order
- orderstatus:
cannot add rfq, quote, order after orderstatus
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.
Good call. Done.
@@ -0,0 +1,5 @@ | |||
--- |
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.
do they tho? i feel like cheetahs aren't good at sharing.
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.
green cheetahs are envious cheetahs
b42642a
to
e755787
Compare
This state machine class
Exchange
will be used to great effect in a follow-up PR in the http-server package.