}) afterAll(() => { process.env['KAFKAJS_DEBUG_PROTOCOL_BUFFERS'] = initialValue })
}) afterAll(async () => { admin && (await admin.disconnect()) consumers && (await Promise.all(consumers.map(consumer => consumer.disconnect())))
describe('SideBar Component', () => { const comp = <SideBar uc={0} un={4} /> let dataElement beforeAll(() => (dataElement = MockDataElement())) afterAll(() => dataElement.remove()) it('should match snapshot and admin should be logged-out', () => { const tree = create(comp).toJSON() expect(tree).toMatchSnapshot() const wrapper = mount(comp) expect(wrapper.find('.m_n_a_admin').exists()).toBe(true) }) it('should mock admin-logout action when clicked', () => { dataElement.setAttribute('data-isadmin', 'true') const wrapper = mount(comp) wrapper.find('.admin-logout').simulate('click', { preventDefault() {} }) }) })
describe('ResendVL Component', () => { let dataElement beforeAll(() => (dataElement = MockDataElement())) afterAll(() => dataElement.remove()) it('should match snapshot and show SecondaryButton', () => { const tree = create(<ResendVL />).toJSON() expect(tree).toMatchSnapshot() }) it('should mock resend-vl action when clicked', () => { const wrapper = shallow(<ResendVL />) wrapper.find('SecondaryButton').simulate('click', { preventDefault() {} }) }) it('should match snapshot with null', () => { dataElement.setAttribute('data-email-verified', 'yes') const tree = create(<ResendVL />).toJSON() expect(tree).toMatchSnapshot() }) })
}) afterAll(() => { document.querySelector('#testing-textarea').remove() })
describe('User config tests', () => { afterAll(async () => { await db.query('DELETE FROM users WHERE id=?', [createdUser.id]) createdUser = {}
afterAll(() => dataElement.remove())
afterAll(() => { orderMessenger.close(); });
afterAll(() => { jetpack.remove(globalConfig.moduleRoot) })
afterAll(() => { window.location.assign = assign; });
// close all mock servers afterAll(() => { httpServer.close(); udpServer.close(); });
afterAll(function () { (0, _garbageCollector["default"])(true); });
afterAll(() => { jetpack.remove(root) })
afterAll(() => { jetpack.remove(globalConfig.moduleRoot) })
afterAll(() => { server.close(); server = null; });