-
-
Notifications
You must be signed in to change notification settings - Fork 777
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Turn it into a folder - Use the stx tagged template literal
- Loading branch information
Showing
17 changed files
with
636 additions
and
482 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
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 |
---|---|---|
|
@@ -14,15 +14,15 @@ describe("A chat room", function () { | |
const jid = '[email protected]'; | ||
const { bookmarks } = _converse.state; | ||
const model = bookmarks.create({ | ||
'jid': jid, | ||
jid, | ||
'autojoin': false, | ||
'name': 'The Play', | ||
'nick': '' | ||
}); | ||
expect(_converse.api.rooms.create).not.toHaveBeenCalled(); | ||
bookmarks.remove(model); | ||
bookmarks.create({ | ||
'jid': jid, | ||
jid, | ||
'autojoin': true, | ||
'name': 'Hamlet', | ||
'nick': '' | ||
|
@@ -43,7 +43,7 @@ describe("A bookmark", function () { | |
await mock.waitForRoster(_converse, 'current', 0); | ||
await mock.waitUntilBookmarksReturned(_converse); | ||
|
||
const jid = _converse.session.get('jid'); | ||
const bare_jid = _converse.session.get('bare_jid'); | ||
const muc1_jid = '[email protected]'; | ||
const { bookmarks } = _converse.state; | ||
|
||
|
@@ -59,7 +59,7 @@ describe("A bookmark", function () { | |
() => IQ_stanzas.filter(s => sizzle('publish[node="urn:xmpp:bookmarks:1"]', s).length).pop()); | ||
|
||
expect(sent_stanza).toEqualStanza(stx` | ||
<iq from="${jid}" id="${sent_stanza.getAttribute('id')}" type="set" xmlns="jabber:client"> | ||
<iq from="${bare_jid}" id="${sent_stanza.getAttribute('id')}" type="set" xmlns="jabber:client"> | ||
<pubsub xmlns="http://jabber.org/protocol/pubsub"> | ||
<publish node="urn:xmpp:bookmarks:1"> | ||
<item id="${muc1_jid}"> | ||
|
@@ -101,7 +101,7 @@ describe("A bookmark", function () { | |
() => IQ_stanzas.filter(s => sizzle('publish[node="urn:xmpp:bookmarks:1"] conference[name="Balcony"]', s).length).pop()); | ||
|
||
expect(sent_stanza).toEqualStanza(stx` | ||
<iq from="${jid}" id="${sent_stanza.getAttribute('id')}" type="set" xmlns="jabber:client"> | ||
<iq from="${bare_jid}" id="${sent_stanza.getAttribute('id')}" type="set" xmlns="jabber:client"> | ||
<pubsub xmlns="http://jabber.org/protocol/pubsub"> | ||
<publish node="urn:xmpp:bookmarks:1"> | ||
<item id="${muc2_jid}"> | ||
|
@@ -152,7 +152,7 @@ describe("A bookmark", function () { | |
() => IQ_stanzas.filter(s => sizzle('publish[node="urn:xmpp:bookmarks:1"] conference[name="Garden"]', s).length).pop()); | ||
|
||
expect(sent_stanza).toEqualStanza(stx` | ||
<iq xmlns="jabber:client" type="set" from="${jid}" id="${sent_stanza.getAttribute('id')}"> | ||
<iq xmlns="jabber:client" type="set" from="${bare_jid}" id="${sent_stanza.getAttribute('id')}"> | ||
<pubsub xmlns="http://jabber.org/protocol/pubsub"> | ||
<publish node="urn:xmpp:bookmarks:1"> | ||
<item id="${muc2_jid}"> | ||
|
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 |
---|---|---|
|
@@ -15,7 +15,7 @@ describe("A bookmark", function () { | |
'storage:bookmarks' | ||
); | ||
|
||
const jid = _converse.session.get('jid'); | ||
const bare_jid = _converse.session.get('bare_jid'); | ||
const muc1_jid = '[email protected]'; | ||
const { bookmarks } = _converse.state; | ||
|
||
|
@@ -31,7 +31,7 @@ describe("A bookmark", function () { | |
() => IQ_stanzas.filter(s => sizzle('item[id="current"]', s).length).pop()); | ||
|
||
expect(sent_stanza).toEqualStanza(stx` | ||
<iq from="${jid}" id="${sent_stanza.getAttribute('id')}" type="set" xmlns="jabber:client"> | ||
<iq from="${bare_jid}" id="${sent_stanza.getAttribute('id')}" type="set" xmlns="jabber:client"> | ||
<pubsub xmlns="http://jabber.org/protocol/pubsub"> | ||
<publish node="storage:bookmarks"> | ||
<item id="current"> | ||
|
@@ -75,7 +75,7 @@ describe("A bookmark", function () { | |
() => IQ_stanzas.filter(s => sizzle('item[id="current"] conference[name="Balcony"]', s).length).pop()); | ||
|
||
expect(sent_stanza).toEqualStanza(stx` | ||
<iq from="${jid}" id="${sent_stanza.getAttribute('id')}" type="set" xmlns="jabber:client"> | ||
<iq from="${bare_jid}" id="${sent_stanza.getAttribute('id')}" type="set" xmlns="jabber:client"> | ||
<pubsub xmlns="http://jabber.org/protocol/pubsub"> | ||
<publish node="storage:bookmarks"> | ||
<item id="current"> | ||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.