Apply prettier formatting
This commit is contained in:
parent
1cac306093
commit
526645c791
1576 changed files with 65385 additions and 62478 deletions
|
@ -14,25 +14,26 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { MatrixEvent } from 'matrix-js-sdk/src/matrix';
|
||||
import { render, RenderResult } from '@testing-library/react';
|
||||
import React from "react";
|
||||
import { MatrixEvent } from "matrix-js-sdk/src/matrix";
|
||||
import { render, RenderResult } from "@testing-library/react";
|
||||
|
||||
import MatrixClientContext from "../../../../src/contexts/MatrixClientContext";
|
||||
import { RoomPermalinkCreator } from "../../../../src/utils/permalinks/Permalinks";
|
||||
import { MediaEventHelper } from "../../../../src/utils/MediaEventHelper";
|
||||
import { getMockClientWithEventEmitter } from '../../../test-utils';
|
||||
import MVideoBody from '../../../../src/components/views/messages/MVideoBody';
|
||||
import { getMockClientWithEventEmitter } from "../../../test-utils";
|
||||
import MVideoBody from "../../../../src/components/views/messages/MVideoBody";
|
||||
|
||||
jest.mock(
|
||||
"../../../../src/customisations/Media",
|
||||
() => {
|
||||
return { mediaFromContent: () => { return { isEncrypted: false }; } };
|
||||
},
|
||||
);
|
||||
jest.mock("../../../../src/customisations/Media", () => {
|
||||
return {
|
||||
mediaFromContent: () => {
|
||||
return { isEncrypted: false };
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
describe("MVideoBody", () => {
|
||||
it('does not crash when given a portrait image', () => {
|
||||
it("does not crash when given a portrait image", () => {
|
||||
// Check for an unreliable crash caused by a fractional-sized
|
||||
// image dimension being used for a CanvasImageData.
|
||||
const { asFragment } = makeMVideoBody(720, 1280);
|
||||
|
@ -68,7 +69,7 @@ function makeMVideoBody(w: number, h: number): RenderResult {
|
|||
const defaultProps = {
|
||||
mxEvent: event,
|
||||
highlights: [],
|
||||
highlightLink: '',
|
||||
highlightLink: "",
|
||||
onHeightChanged: jest.fn(),
|
||||
onMessageAllowed: jest.fn(),
|
||||
permalinkCreator: {} as RoomPermalinkCreator,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue