Skip to content

Instantly share code, notes, and snippets.

View rodoabad's full-sized avatar
😝
Changing the world through JavaScript (and TypeScript)!

Rodo Abad rodoabad

😝
Changing the world through JavaScript (and TypeScript)!
View GitHub Profile
import React from 'react';
export const CommentList = ({
comments,
isLoading,
totalCount
}) => {
if (isLoading) {
return 'Loading';
}
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', () => {
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', () => {
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', () => {
import React from 'react';
export const CommentList = ({
comments
}) => (
comments.length === 0 && 'No comments yet'
);
CommentList.defaultProps = {
comments: []
import React from 'react';
export const CommentList = ({
comments,
isLoading
}) => {
if (isLoading) {
return 'Loading';
}
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', () => {
import React from 'react';
export const CommentList = ({
comments
}) => (
comments.length === 0 && 'No comments yet'
);
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', () => {
import React from 'react';
export const CommentList = () => ({});