Add basic unit tests for JS-XMPP

RESOLVED FIXED

Status

defect
RESOLVED FIXED
7 years ago
2 months ago

People

(Reporter: Usul, Unassigned)

Tracking

Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

7 years ago
While bug  714733 landed - I noticed that It didn't contain much unit tests. For the product's long term maintenance it would be nice to add a few more unit tests.

Updated

4 years ago
Component: Instant Messaging → XMPP
Product: Thunderbird → Chat Core
Version: 12 → trunk

Comment 1

4 years ago
The most important place to start is adding tests for the XML parsing/node handling in xmpp-xml.jsm, as everything else depends on that; and then possibly the connection code in xmpp-session (which currently maybe makes too many assumptions about servers behaving well/according to spec).
OS: Mac OS X → All
Hardware: x86 → All
Summary: Add unit test for xmpp, Facebook → Add basic unit tests for JS-XMPP

Updated

4 years ago
Blocks: 955019

Updated

3 years ago
No longer blocks: 955019

The XML parsing code has tests now (bug 1283139). I added some basic tests for authentication in bug 1527480. Without identifying specific other areas that need test coverage I don't think this is actionable.

Status: NEW → RESOLVED
Last Resolved: 2 months ago
Resolution: --- → FIXED

Ideally for each protocol we should have a test that ensures we can:

  • create an account
  • connect the account (ie. have code that fakes the socket and behaves like a trivial fake server. I think we can just have a bunch of plain text things that the fake server needs to send in response for things the client is sending)
  • send a message (ensure the correct notifications get fired to the imIConversation object)
  • receive a message (check the notifications).
You need to log in before you can comment on or make changes to this bug.