Fix chart bug
This commit is contained in:
		
							parent
							
								
									bf654c6f42
								
							
						
					
					
						commit
						59a32e9352
					
				
					 3 changed files with 38 additions and 1 deletions
				
			
		|  | @ -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); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue