Michael Telatynski
feb83ba161
Convert http-api to Typescript ( #2063 )
2021-12-14 15:34:50 +00:00
Aaron R
80aaa6c32b
Fix imports to work with new lint rules ( #2003 )
...
* Add eslint-plugin-import
Signed-off-by: Aaron Raimist <aaron@raim.ist >
* Autofix
Signed-off-by: Aaron Raimist <aaron@raim.ist >
* Manual fix
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2021-12-09 15:57:43 -07:00
Michael Telatynski
f8097221e6
Improve typing ( #2055 )
2021-12-09 14:22:58 +00:00
Germain
ddd6a05198
Make local echo work for threads ( #2026 )
2021-11-24 08:19:17 +00:00
Brad Murray
8aa283d994
Fix lint in tests
2021-07-25 11:45:09 -04:00
Brad Murray
e85b3b6a8d
Fix the tests and add a test
2021-07-25 11:41:08 -04:00
Michael Telatynski
5a8299f1a5
Convert more of js-sdk crypto and fix underscored field accesses
2021-06-23 14:47:25 +01:00
Michael Telatynski
b1b7522b80
Fix tests by updating private field names and spies
2021-06-17 15:18:52 +01:00
Travis Ralston
e1edd84700
Early pass to fix runtime/build errors
2021-06-02 13:42:20 -06:00
J. Ryan Stinnett
b0e2a38325
Auto-fix lint errors
2021-05-27 17:50:16 +01:00
Germain Souquet
cb91c4292c
Merge branch 'develop' into gsouquet/pr-review-linting-rules
2021-05-27 16:00:12 +01:00
Germain Souquet
5caf05cfa1
Apply new linting rules
2021-05-11 11:25:43 +01:00
Sorunome
e406f32386
Store keys with same index but better trust level
2020-12-29 17:02:01 +01:00
J. Ryan Stinnett
a9c9ec3977
Replace Riot with Element in docs and comments
...
This only covers the simple cases of references to issues and repos. More
complex areas, such as deployment scripts, will be handled separately.
Part of https://github.com/vector-im/element-web/issues/14864
2020-08-03 18:32:52 +01:00
Jorik Schellekens
0f559050d8
Fix whitespace issues
2020-07-21 10:00:16 +01:00
Bruno Windels
668e8f6f24
exclude aborted requests and matrix errors when creating connectionerror
...
- throw an AbortError when aborting is detected
- don't turn AbortError's into a ConnectionError
- also consider the string "aborted" an AbortError for unit tests
- unit tests like to reject the request with a MatrixError,
so exclude those too
2020-04-23 15:18:52 +02:00
Marcel
bff8a947a1
Fix expectBobQueryKeys test
2020-04-07 16:53:28 +02:00
Marcel
9cb7406ebd
Fix downloadKeys test
2020-04-07 16:44:30 +02:00
Marcel
38681ca6ca
Fix expectAliQueryKeys test
2020-04-07 16:31:15 +02:00
Travis Ralston
18ccceca2d
[CONFLICT CHUNKS] Merge branch 'develop' into travis/sourcemaps-dev
2020-01-07 14:37:17 -07:00
Hubert Chathi
01f6b3dfc6
notify devices when we don't send them keys ( #1135 )
...
and handle incoming notifications
2020-01-06 17:47:22 -05:00
Travis Ralston
95c2c1643e
Remove "source-map-support" from tests because it makes sourcemaps worse
...
Now that we're pointing at `src/` for tests, we can stop trying to load source maps from random places. With this dependency used, source maps are off by a few lines.
2019-12-17 15:45:15 -07:00
Travis Ralston
f952f6742f
Remove ancient "use strict" annotations
...
We don't need these anymore. Theoretically this commit could go to develop, but for safety it's going to `travis/sourcemaps` first.
2019-12-17 15:43:02 -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
Travis Ralston
ca6a52727c
Fix logger imports in tests
2019-12-10 11:39:56 -07:00
Michael Telatynski
6bba5ca25a
Rip out some more bluebird
2019-12-02 22:34:46 +00:00
Michael Telatynski
edcdeb31ea
Rip out bluebird of a bunch more places, not as much to go :|
2019-12-02 22:34:46 +00: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
7fb807919c
Stop using bluebird .returns and .spread
2019-11-25 12:31:46 +00:00
Michael Telatynski
5e0ba9971c
nothing works anymore :((
2019-11-23 12:18:39 +00:00
Michael Telatynski
4d950fec66
fixxy
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com >
2019-11-21 10:59:18 +00:00
Michael Telatynski
b4f68f4fc6
Stop using Bluebird promise::nodeify
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com >
2019-11-21 10:43:58 +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
Travis Ralston
fe4ac06f43
Use the correct media endpoints
2019-07-10 13:24:11 -06:00
Travis Ralston
07629bfb9a
unstable -> stable
2019-07-10 13:11:46 -06:00
Travis Ralston
ff9c84ff94
Fix tests
2019-07-03 16:50:24 -06:00
Travis Ralston
3aa2bf8a76
Include the error object when raising Session.logged_out
...
Note: The `call` argument previously defined in the SDK was never actually populated, and appears to be a documentation error when the definition was copied from `Call.incoming` directly above it.
2019-07-03 16:42:33 -06: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
Travis Ralston
deb7433453
Use toMatch for presence events
...
We don't pass the reference through, so the test fails with toEqual
2019-04-15 20:17:42 -06:00
J. Ryan Stinnett
48f290196c
Rename MatrixInMemoryStore to MemoryStore
...
None of the other store classes use the `Matrix` prefix, and I find the mismatch
confusing (it leads me to think it might have a different purpose than the
others).
This change removes the prefix from the store for consistency. The old name is
left as an export for existing SDK consumers.
2019-03-19 14:24:47 +00:00
David Baker
1caf2b7f83
Always track our own devices
...
It's generally a reasonable assumption that we'll be interested in
them, and important for key backup.
Fixes https://github.com/vector-im/riot-web/issues/8213
2019-02-06 16:48:57 +00:00
Travis Ralston
fed67192bc
Fix test: Actually resend the event after unknown devices are found
...
This test didn't actually test that resending would work, despite its name.
2018-11-08 17:17:30 -07:00
David Baker
2b752c0c02
Use new stop() method on matrix-mock-request
...
To finish all pending flushes between tests. This stops the unit
tests from hanging on node 11 when run in certain combinations.
Requires https://github.com/matrix-org/matrix-mock-request/pull/6
(so will need a release of matrix-mock-request before merging)
2018-10-25 14:29:25 +01:00
Bruno Windels
0519c4c6b1
await startClient and use promises also so error gets shown
2018-09-25 15:53:14 +01:00
Bruno Windels
c0f706a2a2
move userId into room
2018-08-15 12:00:38 +02:00
David Baker
64396de0dc
Fix duplicated state events in timeline from peek
...
When joining a room we were peeking into, we duplicated all the
state events into the timeline. Put back the old behaviour of just
setting them as state events, with copious commentary on how wrong
this seems.
2018-03-15 17:35:18 +00:00
David Baker
8aa68b3dc1
lint
2018-02-20 11:09:32 +00:00
David Baker
e810ee7750
Add test for fixed state misbehaviour
2018-02-20 11:06:33 +00:00