1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2026-01-03 23:22:30 +03:00

replace q method calls with bluebird ones

```
find src spec -name '*.js' |
    xargs perl -i -pe 's/q\.(all|defer|reject|delay|try)\(/Promise.$1(/'
```
This commit is contained in:
Richard van der Hoff
2017-07-10 16:55:29 +01:00
parent b58d84fba1
commit cfffbc4a09
21 changed files with 107 additions and 107 deletions

View File

@@ -84,7 +84,7 @@ describe("MatrixClient", function() {
);
}
pendingLookup = {
promise: q.defer().promise,
promise: Promise.defer().promise,
method: method,
path: path,
};
@@ -109,7 +109,7 @@ describe("MatrixClient", function() {
}
if (next.error) {
return q.reject({
return Promise.reject({
errcode: next.error.errcode,
httpStatus: next.error.httpStatus,
name: next.error.errcode,
@@ -120,7 +120,7 @@ describe("MatrixClient", function() {
return Promise.resolve(next.data);
}
expect(true).toBe(false, "Expected different request. " + logLine);
return q.defer().promise;
return Promise.defer().promise;
}
beforeEach(function() {
@@ -174,10 +174,10 @@ describe("MatrixClient", function() {
// a DIFFERENT test (pollution between tests!) - we return unresolved
// promises to stop the client from continuing to run.
client._http.authedRequest.andCall(function() {
return q.defer().promise;
return Promise.defer().promise;
});
client._http.authedRequestWithPrefix.andCall(function() {
return q.defer().promise;
return Promise.defer().promise;
});
});