Skip to content

Commit f7a26dd

Browse files
committed
fix (race?) broken tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
1 parent 2626998 commit f7a26dd

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

‎test/app-tests/joining.js‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ limitations under the License.
1616

1717
/* joining.js: tests for the various paths when joining a room */
1818

19+
import PlatformPeg from 'matrix-react-sdk/lib/PlatformPeg';
20+
import Platform from '../../src/vector/platform';
21+
1922
require('skin-sdk');
2023

2124
var jssdk = require('matrix-js-sdk');
@@ -85,6 +88,8 @@ describe('joining a room', function () {
8588
localStorage.setItem("mx_access_token", ACCESS_TOKEN );
8689
localStorage.setItem("mx_user_id", USER_ID);
8790

91+
PlatformPeg.set(new Platform());
92+
8893
var mc = (
8994
<MatrixChat config={{}}
9095
makeRegistrationUrl={()=>{throw new Error("unimplemented");}}

‎test/app-tests/loading.js‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ limitations under the License.
1616

1717
/* loading.js: test the myriad paths we have for loading the application */
1818

19+
import PlatformPeg from 'matrix-react-sdk/lib/PlatformPeg';
20+
import Platform from '../../src/vector/platform';
21+
1922
import 'skin-sdk';
2023

2124
import React from 'react';
@@ -137,6 +140,8 @@ describe('loading:', function () {
137140
default_is_url: DEFAULT_IS_URL,
138141
}, opts.config || {});
139142

143+
PlatformPeg.set(new Platform());
144+
140145
var params = parseQs(windowLocation);
141146
matrixChat = ReactDOM.render(
142147
<MatrixChat

0 commit comments

Comments
 (0)