import React from 'react' import { render } from '@testing-library/react-native' import { GiftedChat } from '..' const messages = [ { _id: 1, text: 'Hello developer', createdAt: new Date(), user: { _id: 2, name: 'John Doe', }, }, ] it('should render and compare with snapshot', () => { const { toJSON } = render( {}} user={{ _id: 1, }} /> ) expect(toJSON()).toMatchSnapshot() }) it('should render with light colorScheme and compare with snapshot', () => { const { toJSON } = render( {}} user={{ _id: 1, }} colorScheme='light' /> ) expect(toJSON()).toMatchSnapshot() }) it('should render with dark colorScheme and compare with snapshot', () => { const { toJSON } = render( {}} user={{ _id: 1, }} colorScheme='dark' /> ) expect(toJSON()).toMatchSnapshot() })