7 changed files with 12 additions and 94 deletions
@ -1,5 +1,8 @@ |
|||
#/bin/bash |
|||
|
|||
flow-typed install -s --overwrite |
|||
rm flow-typed/npm/{react-i18next_v7.x.x.js,styled-components_v3.x.x.js} |
|||
electron-builder install-app-deps |
|||
rm flow-typed/npm/{react-i18next_v7.x.x.js,styled-components_v3.x.x.js,redux_*} |
|||
|
|||
if [ "$SKIP_REBUILD" != "1" ]; then |
|||
electron-builder install-app-deps |
|||
fi |
|||
|
@ -1,39 +0,0 @@ |
|||
import React from 'react' |
|||
import { getCryptoCurrencyById } from '@ledgerhq/live-common/lib/helpers/currencies' |
|||
|
|||
import render from '__mocks__/render' |
|||
import FormattedVal from '..' |
|||
|
|||
const bitcoinUnit = getCryptoCurrencyById('bitcoin').units[0] |
|||
|
|||
describe('components', () => { |
|||
describe('FormattedVal', () => { |
|||
it('renders a formatted val', () => { |
|||
const component = <FormattedVal unit={bitcoinUnit} val={400000000} /> |
|||
const tree = render(component) |
|||
expect(tree).toMatchSnapshot() |
|||
}) |
|||
|
|||
it('shows sign', () => { |
|||
const component = <FormattedVal alwaysShowSign unit={bitcoinUnit} val={400000000} /> |
|||
const tree = render(component) |
|||
expect(tree).toMatchSnapshot() |
|||
|
|||
const component2 = <FormattedVal alwaysShowSign unit={bitcoinUnit} val={-400000000} /> |
|||
const tree2 = render(component2) |
|||
expect(tree2).toMatchSnapshot() |
|||
}) |
|||
|
|||
it('shows code', () => { |
|||
const component = <FormattedVal showCode unit={bitcoinUnit} val={400000000} /> |
|||
const tree = render(component) |
|||
expect(tree).toMatchSnapshot() |
|||
}) |
|||
|
|||
it('renders a percent', () => { |
|||
const component = <FormattedVal isPercent val={30} /> |
|||
const tree = render(component) |
|||
expect(tree).toMatchSnapshot() |
|||
}) |
|||
}) |
|||
}) |
@ -1,46 +0,0 @@ |
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP |
|||
|
|||
exports[`components FormattedVal renders a formatted val 1`] = ` |
|||
<div |
|||
className="k45ou1-0 iqaJGf e345n3-0 cbufQL" |
|||
color="#66be54" |
|||
> |
|||
4 |
|||
</div> |
|||
`; |
|||
|
|||
exports[`components FormattedVal renders a percent 1`] = ` |
|||
<div |
|||
className="k45ou1-0 iqaJGf e345n3-0 cbufQL" |
|||
color="#66be54" |
|||
> |
|||
30 % |
|||
</div> |
|||
`; |
|||
|
|||
exports[`components FormattedVal shows code 1`] = ` |
|||
<div |
|||
className="k45ou1-0 iqaJGf e345n3-0 cbufQL" |
|||
color="#66be54" |
|||
> |
|||
BTC 4 |
|||
</div> |
|||
`; |
|||
|
|||
exports[`components FormattedVal shows sign 1`] = ` |
|||
<div |
|||
className="k45ou1-0 iqaJGf e345n3-0 cbufQL" |
|||
color="#66be54" |
|||
> |
|||
+ 4 |
|||
</div> |
|||
`; |
|||
|
|||
exports[`components FormattedVal shows sign 2`] = ` |
|||
<div |
|||
className="k45ou1-0 iqaJGf e345n3-0 eZFsmG" |
|||
color="#ea2e49" |
|||
> |
|||
- 4 |
|||
</div> |
|||
`; |
Loading…
Reference in new issue