mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
test fixes
This commit is contained in:
parent
e9dfd37e3d
commit
921e8fe764
@ -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}
|
||||||
/>
|
/>
|
||||||
|
@ -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}
|
||||||
|
Loading…
Reference in New Issue
Block a user