Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📦 v0.2.0 #54

Merged
merged 9 commits into from
Aug 23, 2019
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/__tests__/App.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import React from 'react'
import { customRender } from '../test-utils'
import App from '../App'

jest.mock('../components/ItemTimer', () => {
return () => <span>MockedTime</span>
})

describe('<App />', () => {
it('Should render the <App /> component.', () => {
const container = customRender({ component: App })
Expand Down
16 changes: 15 additions & 1 deletion src/__tests__/__snapshots__/App.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ exports[`<App /> Should render the <App /> component. 1`] = `
Hermes
</h1>
<span>
10 minutes 0 seconds
MockedTime
</span>
<div
class="StyledBox-sc-13pk1d4-0 CAsMy"
Expand Down Expand Up @@ -48,6 +48,20 @@ exports[`<App /> Should render the <App /> component. 1`] = `
<h3>
Cargo
</h3>
<div
class="StyledBox-sc-13pk1d4-0 IRSNj"
>
<span
class="StyledText-sc-1sadyjn-0 bnqisW"
>
Volume Remaining:
</span>
<span
class="StyledText-sc-1sadyjn-0 fWSbXS"
>
5
</span>
</div>
<h3>
Location:
</h3>
Expand Down
8 changes: 8 additions & 0 deletions src/__tests__/components/ItemTimer.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
import { customRender } from '../../test-utils'
import ItemTimer from '../../components/ItemTimer'

jest.mock('../../util', () => {
const moment = require('moment')
const mockCreateDuration = () => moment.duration({ minutes: 60, seconds: 0 })
return {
createDuration: mockCreateDuration
}
})

describe('<ItemTimer />', () => {
it('Should render the <ItemTimer /> component.', () => {
const container = customRender({ component: ItemTimer })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exports[`<ItemTimer /> Should render the <ItemTimer /> component. 1`] = `
<DocumentFragment>
<span>
10 minutes 0 seconds
0 minutes 0 seconds
</span>
</DocumentFragment>
`;
Loading