1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-08-10 21:23:02 +03:00
Commit Graph

41 Commits

Author SHA1 Message Date
Travis Ralston
18ccceca2d [CONFLICT CHUNKS] Merge branch 'develop' into travis/sourcemaps-dev 2020-01-07 14:37:17 -07:00
Travis Ralston
034b8db070 Convert tests to ES6
The earlier commit, d3ce0cb82f, has most of the juicy details on this. In addition to d3ce's changes, we also:
* Use `TestClient` in many integration tests due to subtle behaviour changes in imports when switching to ES6. Namely the behaviour where setting the request function is less reliable in the way we did it, but `TestClient` is very reliable.
* We now use the Olm loader more often to avoid having to maintain so much duplicate code. This makes the imports slightly easier to read.
2019-12-17 15:16:37 -07:00
J. Ryan Stinnett
1fc2ab7f7d Fix backup tests 2019-12-12 16:06:46 +00:00
Travis Ralston
ca6a52727c Fix logger imports in tests 2019-12-10 11:39:56 -07:00
Michael Telatynski
1286007b2e Rip out bluebird of a bunch of places, lots to go :( 2019-12-02 22:34:46 +00:00
Michael Telatynski
bab4582139 Replace more Bluebirdy stuffs 2019-12-02 22:34:46 +00:00
Michael Telatynski
057303d57c s/beforeEach/beforeAll/ for Olm.init() and cleanup sas.spec.js 2019-11-25 13:26:10 +00:00
Michael Telatynski
5fc0629201 fix expect calls
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-11-20 20:19:54 +00:00
Michael Telatynski
fd58957b06 migrate to jest from mocha+expect+istanbul
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-11-20 19:52:50 +00:00
David Baker
d9d65309b3 More s/cross-signing/crossSigning/ 2019-11-14 11:29:08 +00:00
David Baker
a98e6964ef Missed bits of callback renaming 2019-11-11 16:51:49 +00:00
David Baker
a34758f938 Convert event interface to callbacks
Use options.cryptoCallbacks for things that require information
from the app rather than events, since events can have zero, one
or many listeners and the emitter doesn't know how many, so if
nobody's listening then we would have just waited forever for a
response.

Also a collection of other changes like renaming 'fu' to 'firstUse'
2019-11-07 12:31:44 +00:00
Hubert Chathi
8d1d657c44 add unit test for backups signed by cross-signing key 2019-07-03 19:16:26 -04:00
Janith Kasun
de8063a43a Merge branch 'develop' into loglevel-extend 2019-05-19 09:40:38 +05:30
jkasun
a73dabcb67 Console logging to loglevel 2019-05-19 09:29:40 +05:30
J. Ryan Stinnett
761806c678 Add support for class properties
This enables compiler and linting features to allow class properties like we do
in the React SDK.
2019-05-13 13:52:37 +01:00
J. Ryan Stinnett
5a26503da7 Remove sessionStore to cryptoStore migration path
The code to migrate from the `sessionStore` to `cryptoStore` originally appeared
in https://github.com/matrix-org/matrix-js-sdk/pull/584 (2017-12-06). At this
point, it seems safe to assume most sessions that need migrating have already
done so. Removing this code simplifies store handling and removes the
`sessionStore` from most places in JS SDK.
2019-03-20 16:56:47 +00:00
David Baker
1a425af3f2 Pass backup info here too 2019-02-07 15:51:51 +00:00
David Baker
9bafed2c26 OK fine, we'll use the session store 2019-02-07 15:33:49 +00:00
J. Ryan Stinnett
5e3f42ec5a Use olm-loader in all crypto tests
Standardize on importing `olm-loader` rather than pasting the same boilerplate
in different tests.  Importantly, `spec/unit/crypto.spec.js` did not include any
loading approach, so it would only find Olm if some other test loaded it first.

Signed-off-by: J. Ryan Stinnett <jryans@gmail.com>
2018-12-13 08:59:57 +00:00
Hubert Chathi
f8ea019f02 fix some assertions in e2e backup unit test 2018-11-29 11:52:19 -05:00
David Baker
abd2ac7168 Rename backup API call in test 2018-11-20 16:34:04 +00:00
David Baker
29d92d3e81 Lint 2018-10-31 20:05:21 +00:00
David Baker
c6ad0665b5 factor out duplicated test code 2018-10-31 18:03:40 +00:00
David Baker
8ab84dee16 PR feedback 1/n 2018-10-31 17:40:17 +00:00
David Baker
0e26247b53 Speed up time rather than increasing timeouts 2018-10-26 12:08:55 +01:00
David Baker
a6bf40d4e2 We can always import these now 2018-10-25 19:21:29 +01:00
David Baker
b3bb99d76a Stop client after backup tests 2018-10-25 19:11:43 +01:00
Hubert Chathi
91fb7b0a7c fix unit tests for backup recovery 2018-10-12 12:03:51 -04:00
Hubert Chathi
9b12c22823 de-lint plus some minor fixes 2018-10-12 10:38:10 -04:00
Hubert Chathi
3957006fae Merge remote-tracking branch 'upstream/dbkr/e2e_backups' into e2e_backups 2018-10-11 14:01:26 -04:00
Hubert Chathi
da65f43983 wrap backup sending in a try, and add delays 2018-10-10 19:31:28 -04:00
David Baker
ada4b6ef16 Lint 2018-10-09 15:46:12 +01:00
Hubert Chathi
258adda67c retry key backups when they fail 2018-10-04 15:19:20 -04:00
David Baker
2f4c1dfcc4 Test all 3 code paths on backup restore 2018-09-18 17:33:47 +01:00
David Baker
e4bb37b1a8 Fix lint mostly 2018-09-18 14:53:59 +01:00
David Baker
54c443ac68 Make tests pass 2018-09-18 14:48:02 +01:00
Hubert Chathi
73e294b1bd add copyright header to backup.spec 2018-08-23 00:29:29 -04:00
Hubert Chathi
75107f99b2 pass in key rather than decryption object to restoreKeyBackups 2018-08-23 00:26:21 -04:00
Hubert Chathi
1faf477537 fix formatting and fix authedRequest usage 2018-08-22 23:58:59 -04:00
Hubert Chathi
d55618921b initial implementation of e2e key backup and restore 2018-08-07 23:10:55 -04:00