Skip to content

Commit

Permalink
test: add Heatmap component test
Browse files Browse the repository at this point in the history
  • Loading branch information
KnowsCount committed Mar 16, 2022
1 parent 62e8d69 commit 1918234
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ module.exports = {
'^.+\\.(ts|tsx)?$': 'ts-jest',
'^.+\\.(js|jsx)$': 'babel-jest',
},
testEnvironment: 'jsdom',
}
12 changes: 12 additions & 0 deletions src/heatmap/Heatmap.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from 'react'
import { render } from '@testing-library/react'
import { getRandomCount } from '../utils'
import { DAYS_IN_YEAR } from '../constants'

import Heatmap from './Heatmap'

describe('Heatmap', () => {
test('renders the Heatmap component', () => {
render(<Heatmap count={getRandomCount(DAYS_IN_YEAR)} />)
})
})
1 change: 0 additions & 1 deletion src/heatmap/Heatmap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
transformPixelsToNumber,
} from '../utils'
import styled from 'styled-components'
import './Tooltip.css'

export interface IProps {
/**
Expand Down

1 comment on commit 1918234

@vercel
Copy link

@vercel vercel bot commented on 1918234 Mar 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.