Make <Table> stories deterministic for snapshot testing

This commit is contained in:
nikek
2020-05-19 10:04:58 +02:00
parent f8cdfdb1aa
commit 9dd563e3a9
@@ -31,8 +31,8 @@ const generateTestData: (number: number) => Array<{}> = (rows = 10) => {
col1: `Some value ${data.length}`,
col2: `More data ${data.length}`,
subvalue: `Subvalue ${data.length}`,
number: Math.floor(Math.random() * 1000),
date: new Date(Math.random() * 10000000000000),
number: Math.round(Math.abs(Math.sin(data.length)) * 1000),
date: new Date(Math.abs(Math.sin(data.length)) * 10000000000000),
});
}