This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
export const CommentList = ({ | |
comments, | |
isLoading, | |
totalCount | |
}) => { | |
if (isLoading) { | |
return 'Loading'; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {CommentList} from '../CommentList'; | |
import React from 'react'; | |
import {shallow} from 'enzyme'; | |
describe('Given the <CommentList/> component', () => { | |
const requiredProps = () => ({}); | |
const render = (props = requiredProps()) => shallow(<CommentList {...props} />); | |
test('should render', () => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {CommentList} from '../CommentList'; | |
import React from 'react'; | |
import {shallow} from 'enzyme'; | |
describe('Given the <CommentList/> component', () => { | |
const requiredProps = () => ({}); | |
const render = (props = requiredProps()) => shallow(<CommentList {...props} />); | |
test('should render', () => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {CommentList} from '../CommentList'; | |
import React from 'react'; | |
import {shallow} from 'enzyme'; | |
describe('Given the <CommentList/> component', () => { | |
const requiredProps = () => ({}); | |
const render = (props = requiredProps()) => shallow(<CommentList {...props} />); | |
test('should render', () => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
export const CommentList = ({ | |
comments | |
}) => ( | |
comments.length === 0 && 'No comments yet' | |
); | |
CommentList.defaultProps = { | |
comments: [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
export const CommentList = ({ | |
comments, | |
isLoading | |
}) => { | |
if (isLoading) { | |
return 'Loading'; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {CommentList} from '../CommentList'; | |
import React from 'react'; | |
import {shallow} from 'enzyme'; | |
describe('Given the <CommentList/> component', () => { | |
const requiredProps = () => ({}); | |
const render = (props = requiredProps()) => shallow(<CommentList {...props} />); | |
test('should render', () => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
export const CommentList = ({ | |
comments | |
}) => ( | |
comments.length === 0 && 'No comments yet' | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {CommentList} from '../CommentList'; | |
import React from 'react'; | |
import {shallow} from 'enzyme'; | |
describe('Given the <CommentList/> component', () => { | |
const requiredProps = () => ({}); | |
const render = (props = requiredProps()) => shallow(<CommentList {...props} />); | |
test('should render', () => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
export const CommentList = () => ({}); |
NewerOlder