Jérémie Pardou-Piquemal bd1bea20ed
Auto detect language (#141)
* Auto-detect lang

* Fix Chat test

* Default language to empty string

Co-authored-by: Alan Friedman <d.alan.friedman@gmail.com>
2020-05-08 10:47:45 -04:00

18 lines
559 B
JavaScript

import React from 'react'
import { mount } from 'enzyme'
import toJson from 'enzyme-to-json'
import { Chat } from './index.js'
const sendEncryptedMessage = jest.fn()
test('Chat Component', () => {
const component = mount(
<Chat scrollToBottom={() => {}} focusChat={false} userId="foo" username="user" showNotice={() => {}} clearActivities={() => {}} sendEncryptedMessage={sendEncryptedMessage} translations={{}}/>
)
const componentJSON = toJson(component)
expect(component).toMatchSnapshot()
expect(componentJSON.children.length).toBe(1)
})