1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00

test fixes

This commit is contained in:
Matthias Kretschmann 2019-09-13 00:46:10 +02:00
parent e9dfd37e3d
commit 921e8fe764
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 4 additions and 2 deletions

View File

@ -2,16 +2,17 @@ import React from 'react'
import { render } from '@testing-library/react' import { render } from '@testing-library/react'
import { User } from '../../context' import { User } from '../../context'
import { userMockConnected } from '../../../__mocks__/user-mock' import { userMockConnected } from '../../../__mocks__/user-mock'
import searchMock from '../../../__fixtures__/search.json'
import Filters from './Filters' import Filters from './Filters'
describe('Filters', () => { describe('Filters', () => {
it('renders without crashing', () => { it('renders without crashing', () => {
const { debug, container } = render( const { container } = render(
<User.Provider value={userMockConnected}> <User.Provider value={userMockConnected}>
<Filters <Filters
category="Architecture" category="Architecture"
license="Public" license="Public"
results={[]} results={searchMock.results}
filterByCategory={() => null} filterByCategory={() => null}
filterByLicense={() => null} filterByLicense={() => null}
/> />

View File

@ -77,6 +77,7 @@ export default function Filters({
return ( return (
<FilterItem <FilterItem
key={shortid.generate()}
isActive={isActive} isActive={isActive}
filter={filter} filter={filter}
filterByCategory={filterByCategory} filterByCategory={filterByCategory}