Skip to content

Commit

Permalink
🔀 Merge pull request #52 from alexlee-dev/feature/item-count
Browse files Browse the repository at this point in the history
✨ Ability to add / sell items in larger quantities than 1
  • Loading branch information
Alex Lee committed Aug 23, 2019
2 parents 3d6914c + 9a82eba commit 4931c89
Show file tree
Hide file tree
Showing 19 changed files with 639 additions and 173 deletions.
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

0 comments on commit 4931c89

Please sign in to comment.