fix (race?) broken tests

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2017-11-19 20:46:40 +00:00
parent 26269986f5
commit f7a26ddb91
No known key found for this signature in database
GPG key ID: 3F879DA5AD802A5E
2 changed files with 10 additions and 0 deletions

View file

@ -16,6 +16,9 @@ limitations under the License.
/* joining.js: tests for the various paths when joining a room */ /* joining.js: tests for the various paths when joining a room */
import PlatformPeg from 'matrix-react-sdk/lib/PlatformPeg';
import Platform from '../../src/vector/platform';
require('skin-sdk'); require('skin-sdk');
var jssdk = require('matrix-js-sdk'); var jssdk = require('matrix-js-sdk');
@ -85,6 +88,8 @@ describe('joining a room', function () {
localStorage.setItem("mx_access_token", ACCESS_TOKEN ); localStorage.setItem("mx_access_token", ACCESS_TOKEN );
localStorage.setItem("mx_user_id", USER_ID); localStorage.setItem("mx_user_id", USER_ID);
PlatformPeg.set(new Platform());
var mc = ( var mc = (
<MatrixChat config={{}} <MatrixChat config={{}}
makeRegistrationUrl={()=>{throw new Error("unimplemented");}} makeRegistrationUrl={()=>{throw new Error("unimplemented");}}

View file

@ -16,6 +16,9 @@ limitations under the License.
/* loading.js: test the myriad paths we have for loading the application */ /* loading.js: test the myriad paths we have for loading the application */
import PlatformPeg from 'matrix-react-sdk/lib/PlatformPeg';
import Platform from '../../src/vector/platform';
import 'skin-sdk'; import 'skin-sdk';
import React from 'react'; import React from 'react';
@ -137,6 +140,8 @@ describe('loading:', function () {
default_is_url: DEFAULT_IS_URL, default_is_url: DEFAULT_IS_URL,
}, opts.config || {}); }, opts.config || {});
PlatformPeg.set(new Platform());
var params = parseQs(windowLocation); var params = parseQs(windowLocation);
matrixChat = ReactDOM.render( matrixChat = ReactDOM.render(
<MatrixChat <MatrixChat