mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 06:28:51 +00:00
formatting
This commit is contained in:
1 parent
e48263838f
commit
3a1bd75f97
23 files changed
+309
-236
No files matched your search
@@ -1,42 +1,47 @@
|
||||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
import TwitterNotification from './TwitterNotification';
|
||||
import React from "react";
|
||||
import { shallow } from "enzyme";
|
||||
import TwitterNotification from "./TwitterNotification";
|
||||
|
||||
jest.mock('react-i18next', () => ({
|
||||
useTranslation: () => ({t: key => key})
|
||||
jest.mock("react-i18next", () => ({
|
||||
useTranslation: () => ({ t: (key) => key }),
|
||||
}));
|
||||
|
||||
jest.mock('../../../../os/phone/hooks/usePhone', () => ({
|
||||
usePhone: jest.fn().mockReturnValue({ config: {
|
||||
twitter: {
|
||||
showNotifications: true,
|
||||
}
|
||||
} })
|
||||
jest.mock("../../../../os/phone/hooks/usePhone", () => ({
|
||||
usePhone: jest.fn().mockReturnValue({
|
||||
config: {
|
||||
twitter: {
|
||||
showNotifications: true,
|
||||
},
|
||||
},
|
||||
}),
|
||||
}));
|
||||
|
||||
jest.mock('../../hooks/useTwitterNotification', () => ({
|
||||
useTwitterNotification: jest.fn().mockReturnValue({ notification: {
|
||||
profile_name: 'test',
|
||||
message: 'test message'
|
||||
} })
|
||||
jest.mock("../../hooks/useTwitterNotification", () => ({
|
||||
useTwitterNotification: jest.fn().mockReturnValue({
|
||||
notification: {
|
||||
profile_name: "test",
|
||||
message: "test message",
|
||||
},
|
||||
}),
|
||||
}));
|
||||
|
||||
describe("TwitterNotification", () => {
|
||||
let wrapper;
|
||||
|
||||
describe('TwitterNotification', () => {
|
||||
let wrapper;
|
||||
beforeEach(() => {
|
||||
wrapper = shallow(<TwitterNotification />);
|
||||
});
|
||||
it("renders", () => {
|
||||
expect(wrapper).toBeDefined();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
wrapper = shallow(<TwitterNotification />)
|
||||
})
|
||||
it('renders', () => {
|
||||
expect(wrapper).toBeDefined();
|
||||
});
|
||||
it("renders profile name", () => {
|
||||
expect(wrapper.find(".makeStyles-profileName-5").text()).toEqual("@test");
|
||||
});
|
||||
|
||||
it('renders profile name', () => {
|
||||
expect(wrapper.find('.makeStyles-profileName-5').text()).toEqual('@test');
|
||||
});
|
||||
|
||||
it('renders message', () => {
|
||||
expect(wrapper.find('.makeStyles-message-7').text()).toEqual('test message');
|
||||
});
|
||||
it("renders message", () => {
|
||||
expect(wrapper.find(".makeStyles-message-7").text()).toEqual(
|
||||
"test message"
|
||||
);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user