mirror of
https://github.com/getredash/redash.git
synced 2026-03-22 01:00:14 -04:00
* Prettier all the JS files * Add GitHub Action to autoformat code pushed to master * Fix eslint violation due to formatting. * Remove GitHub actions for styling * Add restyled.io config
23 lines
559 B
JavaScript
23 lines
559 B
JavaScript
import React from "react";
|
|
import renderer from "react-test-renderer";
|
|
import { Group } from "@/services/group";
|
|
import UserShow from "./UserShow";
|
|
|
|
beforeEach(() => {
|
|
Group.query = jest.fn(dataCallback => dataCallback([]));
|
|
});
|
|
|
|
test("renders correctly", () => {
|
|
const user = {
|
|
id: 2,
|
|
name: "John Doe",
|
|
email: "john@doe.com",
|
|
groupIds: [],
|
|
profileImageUrl: "http://www.images.com/llama.jpg",
|
|
};
|
|
|
|
const component = renderer.create(<UserShow user={user} />);
|
|
const tree = component.toJSON();
|
|
expect(tree).toMatchSnapshot();
|
|
});
|