1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-07-30 04:23:07 +03:00
Commit Graph

1429 Commits

Author SHA1 Message Date
1f86dbd12f Add support for forwarding room keys to megolm
when we receive a m.forwarded_room_key, add it to the crypto store, but
remember who forwarded it to us, so we can decide whether to trust them
separately.
2017-06-20 12:39:36 +01:00
be3fb0f917 Make a start on a unit test for megolm alg impl
not much here yet, but it's a start at least.
2017-06-20 11:51:30 +01:00
655be2fa2e Fix race in device list updates
Don't consider device lists up-to-date when we have another request for the
relevant user in the queue.

Fixes https://github.com/vector-im/riot-web/issues/3796.
2017-05-05 12:34:00 +01:00
bf6490739d Fix tests
Make setSyncData return promises in a few places and fix all the
places the tests assume that /sync being flushed == the sync
result being processed.
2017-04-06 15:20:50 +01:00
b72b38b0a3 Add missed methods to stub/memory store
and fix tests
2017-04-03 17:45:58 +01:00
c30670000d Handle 'limited' timeline responses in the SyncAccumulator
Fixes vector-im/riot-web#3375
2017-03-16 13:20:27 +00:00
08a3aea1c7 Fix tests 2017-02-28 13:44:44 +00:00
36b8b2c679 Unbreak tests. Add UT for account data 2017-02-21 11:51:45 +00:00
5aa146f0a6 Add function to UTs 2017-02-17 10:41:04 +00:00
c93c8a79b7 Add startup() to store API 2017-02-17 10:14:12 +00:00
9a9646d012 Review comments 2017-02-16 11:28:51 +00:00
9fdeb7a8e3 Add tests for the SyncAccumulator 2017-02-15 16:21:06 +00:00
cc1daa5a54 Fix tests due to API breakage 2017-02-09 17:32:23 +00:00
bd226d94d8 Switch from jasmine to mocha + expect + lolex
Much of this transformation has been done automatically:
 * add expect import to each file
 * replace `not.to` with `toNot`
 * replace `to[Not]Be{Undefined,Null}` with equivalents
 * replace `jasmine.createSpy(...)` with `except.createSpy`, and `andCallFake`
   with `andCall`

Also:
 * replace `jasmine.createSpyObj` with manual alternatives
 * replace `jasmine.Clock` with `lolex`
2017-02-08 14:32:37 +00:00
8a487ca1bc Merge branch 'rav/source_map_support' into develop 2017-02-08 11:35:27 +00:00
80d0aadbd0 Install source-map-support in each test
This makes exception traces use the source map, which is much more helpful when
debugging.
2017-02-07 22:57:09 +00:00
d744cecbfa Make the tests work without olm
Olm is an optional dependency, so the tests should work without it.
2017-02-07 22:56:56 +00:00
423175f539 eslint --fix for dangley commas on function calls 2017-01-20 16:12:02 +00:00
7bca05af64 eslint ---fix for prefer-const 2017-01-19 17:42:10 +00:00
317898d41c Fix linting on all tests
Manually.
2017-01-16 10:28:51 +00:00
cc39ede920 Reduce max warnings and fix lint errors 2017-01-13 14:36:48 +00:00
5abf6b9f20 Manually patch up files which were formatted wrong
`eslint --fix` expands `if` statements incorrectly (wrong indentation).
2017-01-13 11:50:00 +00:00
478550ec93 Not sure how this ever worked, but fix it since it wasn't working 2017-01-13 11:03:00 +00:00
5f28bc4468 Fix errors (line limits) 2017-01-13 10:55:17 +00:00
7ed65407e6 Pass through eslint --fix 2017-01-13 10:49:32 +00:00
97e421306b Remove UTs 2017-01-13 10:47:20 +00:00
e057956ede Add google eslint rules as a base
Remove some we don't care about. Set some other ones we do care
about but don't currently adhere to to warn. Set the max warnings
threshold to the current number of warnings, so we don't introduce
more of them. Fix a bunch of legit lint errors and add exceptions
to various places in the test code that does funny things with
'this'.
2017-01-12 14:35:58 +00:00
14fac241f7 bump to olm 2.1.0 2016-12-23 14:36:22 +00:00
b11bff5a5b Bump to Olm 2.0
... since the code requires it. Also update the tests.
2016-12-14 14:15:31 +00:00
15d8252909 Merge pull request #234 from matrix-org/rav/interactive_auth
Utility to help with interactive auth
2016-10-12 18:13:36 +01:00
09255a52f7 Merge branch 'release-v0.6.3' 2016-10-12 11:27:05 +01:00
de7061184b Utility to help with interactive auth 2016-10-12 08:27:53 +01:00
892ca56808 Merge pull request #228 from pik/bug-invalid-filter
Fix sync breaking when an invalid filterId is in localStorage
2016-10-09 20:35:09 +01:00
pik
828c7ba451 Fix sync breaking when an invalid filterId is in localStorage
* if getFilter fails for a filterId, null out the localStorage id and
   redirect to the createFilter path
 * add spec
 * fix unit/matrix-client.spec.js http response not matching synapse
2016-10-09 14:17:18 -05:00
92ae4dda72 Add short delay before keepalives + 'RECONNECTING'
Changed my mind - it's a good idea to wait a short time before
sending a keepalive request: this will make sure we never
tightloop.

This also adds a 'RECONNECTING' state for when a sync request has
failed but there is no reason to suspect there is actually a
connectivity problem. This is necessary for the tests to be able
to advance the clock at the appropriate time, but could be nice
for clients. Add a breaking change changelog entry since
technically this is an API change that might break clients if they
were relying on 'SYNCING' always coming before 'ERROR' for some
reason.
2016-10-07 11:29:52 +01:00
cd5a88c718 Fix tests
* Go back to previous behaviour of continuing to emit ERROR states if it continues to fail
 * Don't set a timer if the timeout is zero
 * Change test to assert the continued-error behaviour, not exactly multiple syncs failing
 * Update other tests to fail the keepalive requests where appropriate
2016-10-06 20:54:57 +01:00
86ea00cfee Revert "Handle the first /sync failure differently." 2016-10-06 16:27:38 +01:00
f6614ac0e4 Fix tests 2016-09-23 10:08:40 +01:00
71f23ffce1 Merge branch 'develop' into markjh/megolm
Conflicts:
	lib/crypto/algorithms/megolm.js
2016-09-15 17:10:02 +01:00
eb4166afe3 Whitespace 2016-09-15 14:36:53 +01:00
b3beaacec7 Remove unnecessary dep 2016-09-15 14:26:05 +01:00
577b0e8f1b Add a test to check the olm version 2016-09-15 14:08:25 +01:00
8a848deddc unbreak mocks in tests 2016-09-12 15:52:10 +01:00
f959e1a134 incorporate PR feedback 2016-09-08 22:38:39 +01:00
13c186dfbe fix lint 2016-09-08 15:29:53 +01:00
4d88736d13 add much-needed room.getUnfilteredTimelineSet() helper 2016-09-08 14:37:26 +01:00
fc495a5f1e fix lint 2016-09-08 00:18:17 +01:00
91f8df8d19 make EventTimeline take an EventTimelineSet 2016-09-07 21:17:06 +01:00
2daa1b6007 change TimelineWindow to take a timelineSet rather than a Room 2016-09-04 13:57:56 +01:00
4ff2ad9fac s/EventTimelineList/EventTimelineSet/g at vdh's req 2016-09-03 22:27:29 +01:00