Initial jest stuff. Blocked on Babel 7

This commit is contained in:
Michael Telatynski 2019-12-13 13:43:48 +00:00
parent b7fe06706d
commit 18f81d80db
19 changed files with 1144 additions and 77 deletions

View file

@ -11,26 +11,6 @@ import {ValidatedServerConfig} from "../src/utils/AutoDiscoveryUtils";
import ShallowRenderer from 'react-test-renderer/shallow';
const MatrixEvent = jssdk.MatrixEvent;
/**
* Perform common actions before each test case, e.g. printing the test case
* name to stdout.
* @param {Mocha.Context} context The test context
*/
export function beforeEach(context) {
const desc = context.currentTest.fullTitle();
console.log();
// this puts a mark in the chrome devtools timeline, which can help
// figure out what's been going on.
if (console.timeStamp) {
console.timeStamp(desc);
}
console.log(desc);
console.log(new Array(1 + desc.length).join("="));
}
export function getRenderer() {
// Old: ReactTestUtils.createRenderer();
return new ShallowRenderer();