archivedFile.test.tsx
TLDR
This file is a test file for the ArchivedFile
component. It renders the component with sample data and verifies that the rendered output matches the expected snapshot.
Methods
No methods in this file.
Classes
No classes in this file.
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import React from 'react'
import {render} from '@testing-library/react'
import {FileInfo} from '../../../blocks/block'
import ArchivedFile from './archivedFile'
describe('components/content/archivedFile', () => {
it('should match snapshot', () => {
const fileInfo: FileInfo = {
archived: true,
extension: '.txt',
name: 'stuff to put in jell-o',
size: 2056,
}
const component = (<ArchivedFile fileInfo={fileInfo}/>)
const {container} = render(component)
expect(container).toMatchSnapshot()
})
})