|
1 | 1 | import { getFormatTime } from '../monitorUtils'
|
2 | 2 |
|
3 | 3 | const getOutputForFormatTime: any[] = [
|
4 |
| - ['1641450853.668074', '09:34:13.668'], |
5 |
| - ['1641450854.612083', '09:34:14.612'], |
6 |
| - ['1641450856.616102', '09:34:16.616'], |
7 |
| - ['1641450858.616121', '09:34:18.616'], |
| 4 | + [undefined, 'Invalid time'], |
| 5 | + [null, 'Invalid time'], |
| 6 | + [{}, 'Invalid time'], |
| 7 | + ['oeuoeu', 'Invalid time'], |
| 8 | + [1, 'Invalid time'], |
| 9 | + [11641450853, 'Invalid time'], |
| 10 | + ['1641450853.668074[0', 'Invalid time'], |
| 11 | + ['1641450853.668074', ':34:13.668'], |
| 12 | + ['1641450854.612083', ':34:14.612'], |
| 13 | + ['1641450856.616102', ':34:16.616'], |
| 14 | + ['1641450858.616121', ':34:18.616'], |
8 | 15 | ]
|
9 | 16 |
|
10 |
| -describe.skip('formatToText', () => { |
| 17 | +describe('formatToText', () => { |
11 | 18 | it.each(getOutputForFormatTime)('for input: %s (reply), should be output: %s',
|
12 | 19 | (reply, expected) => {
|
13 | 20 | const result = getFormatTime(reply)
|
14 |
| - expect(result).toBe(expected) |
| 21 | + expect(result).toContain(expected) |
15 | 22 | })
|
16 | 23 | })
|
0 commit comments