1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-08-13 19:42:25 +03:00
Commit Graph

22 Commits

Author SHA1 Message Date
Richard van der Hoff
a73f898bb9 try to make mock-request logging saner 2017-02-08 17:26:45 +00:00
Richard van der Hoff
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
David Baker
423175f539 eslint --fix for dangley commas on function calls 2017-01-20 16:12:02 +00:00
David Baker
7bca05af64 eslint ---fix for prefer-const 2017-01-19 17:42:10 +00:00
Kegan Dougal
317898d41c Fix linting on all tests
Manually.
2017-01-16 10:28:51 +00:00
Kegan Dougal
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
Kegan Dougal
7ed65407e6 Pass through eslint --fix 2017-01-13 10:49:32 +00:00
Richard van der Hoff
a3d86c03b1 Fix uploadContent for node.js
9e89e71e broke uploadContent, making it set 'json=true' on the request, so that
we would try to turn raw content into JSON. It also misguidedly set a
client-side timeout of 30s.

Fix that, and add some tests to check uploadContent works.

In mock-request: distinguish between an expectation (ExpectedRequest)
and an actual request (Request). Add support for checking the headers, and the
request options in general, to Request.
2016-10-08 17:48:10 +01:00
Richard van der Hoff
83bad6ee0d Fix lint error
semicolons rool
2016-04-14 13:52:34 +01:00
Richard van der Hoff
3404751eb9 Clean up test shutdown
Make sure that the integration tests actually kill off all of their timers, so
that jasmine exits cleanly.

This probably also fixes https://github.com/vector-im/vector-web/issues/1365.
2016-04-14 12:01:23 +01:00
Kegan Dougal
73e0216f78 Scrollback improvements
Add a 3s delay between scrollback requests if the previous scrollback request
failed.

Return the same promise if scrollback() is called multiple times whilst a
scrollback request is ongoing.
2015-12-04 17:27:16 +00:00
Kegan Dougal
be6d64fbfd Add integration tests; fix bugs. 2015-10-26 16:12:06 +00:00
Mark Haines
2ee5977ad2 Start integrating end-to-end into the matrix-client. Add a storage class to store end-to-end sessions. Implement the one-time key upload API, and start sketching out the encryption and decryption functions 2015-07-16 18:21:25 +01:00
Kegan Dougal
f49234a772 Add pagination tests 2015-06-25 17:29:25 +01:00
Kegan Dougal
325c00c660 Set Room.oldState.paginationToken to null at the start of the timeline. Fix linting errors. 2015-06-25 15:28:25 +01:00
Kegan Dougal
c4c68a0287 Add local echo tests. 2015-06-25 15:24:56 +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