generated from wechaty/puppet-mock
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from fabian4/fix_talkerId_and_listenerId
replace fromId by talkerId, toId by listenerId
- Loading branch information
Showing
3 changed files
with
47 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,9 +53,9 @@ test('message parser for text message', async t => { | |
} | ||
const messagePayload = await puppet.messageRawPayloadParser(walnutMessagePayload as WalnutMessagePayload) | ||
t.ok( | ||
messagePayload.toId === 'sip:[email protected]' | ||
messagePayload.listenerId === 'sip:[email protected]' | ||
&& messagePayload.roomId === undefined | ||
&& messagePayload.fromId === '17928222350' | ||
&& messagePayload.talkerId === '17928222350' | ||
&& messagePayload.text === 'hello world' | ||
&& messagePayload.type === PUPPET.types.Message.Text, | ||
) | ||
|
@@ -95,9 +95,9 @@ test('message parser for image message', async t => { | |
} | ||
const messagePayload = await puppet.messageRawPayloadParser(walnutMessagePayload as WalnutMessagePayload) | ||
t.ok( | ||
messagePayload.toId === 'sip:[email protected]' | ||
messagePayload.listenerId === 'sip:[email protected]' | ||
&& messagePayload.roomId === undefined | ||
&& messagePayload.fromId === '17928222350' | ||
&& messagePayload.talkerId === '17928222350' | ||
&& messagePayload.text === 'image' | ||
&& messagePayload.type === PUPPET.types.Message.Image, | ||
) | ||
|
@@ -137,9 +137,9 @@ test('message parser for file message', async t => { | |
} | ||
const messagePayload = await puppet.messageRawPayloadParser(walnutMessagePayload as WalnutMessagePayload) | ||
t.ok( | ||
messagePayload.toId === 'sip:[email protected]' | ||
messagePayload.listenerId === 'sip:[email protected]' | ||
&& messagePayload.roomId === undefined | ||
&& messagePayload.fromId === '17928222350' | ||
&& messagePayload.talkerId === '17928222350' | ||
&& messagePayload.text === 'file' | ||
&& messagePayload.type === PUPPET.types.Message.Attachment, | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters