Use the new ShallowRenderer over ReactTestUtils
Mostly because the ReactTestUtils renderer doesn't exist anymore.
This commit is contained in:
parent
acf474c402
commit
99b8193ce7
4 changed files with 23 additions and 2 deletions
|
@ -9,6 +9,7 @@ import dis from '../src/dispatcher';
|
|||
import jssdk from 'matrix-js-sdk';
|
||||
import {makeType} from "../src/utils/TypeUtils";
|
||||
import {ValidatedServerConfig} from "../src/utils/AutoDiscoveryUtils";
|
||||
import ShallowRenderer from 'react-test-renderer/shallow';
|
||||
const MatrixEvent = jssdk.MatrixEvent;
|
||||
|
||||
/**
|
||||
|
@ -31,6 +32,10 @@ export function beforeEach(context) {
|
|||
console.log(new Array(1 + desc.length).join("="));
|
||||
}
|
||||
|
||||
export function getRenderer() {
|
||||
// Old: ReactTestUtils.createRenderer();
|
||||
return new ShallowRenderer();
|
||||
}
|
||||
|
||||
/**
|
||||
* Stub out the MatrixClient, and configure the MatrixClientPeg object to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue