diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2019-10-31 15:51:33 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2019-10-31 15:51:33 +0900 |
| commit | 59a32e9352681ba2bea67c96ba4eea7f36cf6b60 (patch) | |
| tree | c10289575c5033592c37c9f4f9cb9fc5f42049f1 /test | |
| parent | Componentize modal (#5386) (diff) | |
| download | sharkey-59a32e9352681ba2bea67c96ba4eea7f36cf6b60.tar.gz sharkey-59a32e9352681ba2bea67c96ba4eea7f36cf6b60.tar.bz2 sharkey-59a32e9352681ba2bea67c96ba4eea7f36cf6b60.zip | |
Fix chart bug
Diffstat (limited to 'test')
| -rw-r--r-- | test/chart.ts | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/chart.ts b/test/chart.ts index bd26f3bf36..85b9d25251 100644 --- a/test/chart.ts +++ b/test/chart.ts @@ -106,6 +106,30 @@ describe('Chart', () => { }); })); + + it('Can updates (dec)', async(async () => { + await testChart.decrement(); + + const chartHours = await testChart.getChart('hour', 3); + const chartDays = await testChart.getChart('day', 3); + + assert.deepStrictEqual(chartHours, { + foo: { + dec: [1, 0, 0], + inc: [0, 0, 0], + total: [-1, 0, 0] + }, + }); + + assert.deepStrictEqual(chartDays, { + foo: { + dec: [1, 0, 0], + inc: [0, 0, 0], + total: [-1, 0, 0] + }, + }); + })); + it('Empty chart', async(async () => { const chartHours = await testChart.getChart('hour', 3); const chartDays = await testChart.getChart('day', 3); |