Kegan Dougal
61f107f6f9
Hide the data store from the end-user. Proxy calls to getRoom.
2015-06-11 16:36:30 +01:00
Kegan Dougal
19a5b99dea
Add RoomMember and RoomState event emissions with UTs. Hook everything up.
...
Distinguish between inserts and updates to the members dictionary to allow
listeners to add more hooks to the member before it has been given state.
2015-06-11 14:29:32 +01:00
Kegan Dougal
911ca1d5c5
Implement Room event emissions with UTs.
...
Shuffle test groupings into EventEmitter and startClient. Add more jsdoc.
2015-06-11 13:22:21 +01:00
Kegan Dougal
4c3e56ad4c
Add test for event emitting. Fix reEmit function.
2015-06-11 11:58:31 +01:00
Kegan Dougal
fc2c6f403d
Re-add power-level/typing UTs as RoomMember tests.
2015-06-10 17:19:56 +01:00
Kegan Dougal
5cf29ae1b1
Make RoomMember set its own properties, not RoomState.
...
Also make it clear which methods may fire events off using @fires. This
shifts a lot of RoomState logic to RoomMember.
2015-06-10 17:06:28 +01:00
Kegan Dougal
b2620507fa
Remove startClient(callback); Emit 'syncError' and 'event'.
...
'syncError' event is intended to be used to update the UI to say "connection
lost". Add UTs for 'event' emissions.
2015-06-10 16:19:38 +01:00
Kegan Dougal
f9f8816b7d
Return '?' instead of 'Unknown' for rooms which names cannot be calculated.
...
This makes it easier to localise in the future (if name == '?'), whilst
still indicating an unknown name. Ideally we would be returning null, but
this would require null checks every time the room name was accessed, which
isn't ideal. This also makes the UT for this less brittle (rather than
comparing literal english strings which are prone to breakage when we
inevitably change 'Unknown' to 'unknown' or something else.
2015-06-10 09:44:53 +01:00
Kegan Dougal
44e3b55975
Appease linters.
2015-06-09 17:06:40 +01:00
Kegan Dougal
4ff6ecd58c
Add room name UTs and add self-chat room name.
2015-06-09 17:05:56 +01:00
Kegan Dougal
fd2bd4784d
Fix linters
2015-06-09 16:08:14 +01:00
Kegan Dougal
13462ad1aa
Add more Room and RoomState unit tests.
2015-06-09 16:07:44 +01:00
Kegan Dougal
a0bd25a6d2
Handle power levels and update RoomMember properties.
...
Add unit tests for RoomState.
2015-06-09 15:23:04 +01:00
Kegan Dougal
2fb68cfed2
Handle m.typing events.
2015-06-09 10:27:37 +01:00
Kegan Dougal
8d2f058d3d
Appease linters
2015-06-08 17:31:53 +01:00
Kegan Dougal
a43447b00e
Add tests to exercise room name / timeline logic; fix some bugs as a result.
2015-06-08 17:27:10 +01:00
Kegan Dougal
8d8efd037b
Appease linters.
2015-06-08 10:32:20 +01:00
Kegan Dougal
c4aeac31c1
Fix tests; add logs and use promises when flushing.
2015-06-08 10:17:24 +01:00
Kegan Dougal
bf1a9f83e6
Appease closure linter.
2015-06-05 17:45:56 +01:00
Kegan Dougal
be6ab91ab5
Add docs for mock-request.HttpBackend to make it less magical.
2015-06-05 17:42:49 +01:00
Kegan Dougal
3d90942e9b
Appease jshint
2015-06-05 17:36:15 +01:00
Kegan Dougal
0d25fbcbe7
Add MatrixClient.startClient tests using Jasmine.
2015-06-05 17:32:50 +01:00