villebro commented on code in PR #30599: URL: https://github.com/apache/superset/pull/30599#discussion_r1800156959
########## superset-frontend/packages/superset-ui-core/test/number-format/factories/createDurationFormatter.test.ts: ########## @@ -19,40 +19,41 @@ import { NumberFormatter, createDurationFormatter } from '@superset-ui/core'; -describe('createDurationFormatter()', () => { - it('creates an instance of NumberFormatter', () => { - const formatter = createDurationFormatter(); - expect(formatter).toBeInstanceOf(NumberFormatter); - }); - it('format milliseconds in human readable format with default options', () => { - const formatter = createDurationFormatter(); - expect(formatter(0)).toBe('0ms'); - expect(formatter(1000)).toBe('1s'); - expect(formatter(1337)).toBe('1.3s'); - expect(formatter(10500)).toBe('10.5s'); - expect(formatter(60 * 1000)).toBe('1m'); - expect(formatter(90 * 1000)).toBe('1m 30s'); +test('creates an instance of NumberFormatter', () => { + const formatter = createDurationFormatter(); + expect(formatter).toBeInstanceOf(NumberFormatter); +}); +test('format milliseconds in human readable format with default options', () => { + const formatter = createDurationFormatter(); + expect(formatter(-1000)).toBe('-1s'); Review Comment: note the added negative duration tests that previously weren't supported. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org