Skip to content

Commit 50c9632

Browse files
committed
add Statistics test, stringify data prop on Statistic test
1 parent 2237a09 commit 50c9632

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

test/specs/views/Items/Statistic-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ describe('Statistic', () => {
99
render(<Statistic value={value} />).assertText(value);
1010
});
1111
it('renders data', () => {
12-
const data = _.random(0, 10000000);
12+
const data = _.random(0, 10000000).toLocaleString();
1313
render(<Statistic data={data} />).assertText(data);
1414
});
1515
});
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import React from 'react';
2+
import {Statistics} from 'stardust';
3+
import faker from 'faker';
4+
5+
describe('Statistics', () => {
6+
it('renders children', () => {
7+
const child = faker.hacker.phrase();
8+
render(<Statistics>{child}</Statistics>)
9+
.assertText(child);
10+
});
11+
});

0 commit comments

Comments
 (0)