1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-25 05:23:13 +03:00

Fix tests

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2020-05-18 20:03:04 +01:00
parent e381b1901e
commit b9352cfcc1
3 changed files with 8 additions and 4 deletions

View File

@@ -92,9 +92,6 @@
"typescript": "^3.7.3"
},
"jest": {
"testEnvironment": "node",
"setupFilesAfterEnv": [
"<rootDir>/spec/setupTests.js"
]
"testEnvironment": "node"
}
}

View File

@@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// load XmlHttpRequest mock
import "./setupTests";
import "../../dist/browser-matrix"; // uses browser-matrix instead of the src
import {MockStorageApi} from "../MockStorageApi";
import {WebStorageSessionStore} from "../../src/store/session/webstorage";
@@ -65,6 +67,11 @@ describe("Browserify Test", function() {
await httpBackend.stop();
});
afterAll(() => {
// clean up XMLHttpRequest mock
global.XMLHttpRequest = undefined;
});
it("Sync", async function() {
const event = utils.mkMembership({
room: ROOM_ID,