mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
[bugfix] Display raw value in addition to ERROR (#6417)
* Display raw value in addition to ERROR * update unit test
This commit is contained in:
committed by
Grace Guo
parent
7eb46843cb
commit
3c6e882d28
@@ -29,7 +29,7 @@ describe('utils', () => {
|
||||
expect(d3format('.3s', 1234)).toBe('1.23k');
|
||||
expect(d3format('.3s', 1237)).toBe('1.24k');
|
||||
expect(d3format('', 1237)).toBe('1.24k');
|
||||
expect(d3format('.2efd2.ef.2.e', 1237)).toBe('ERROR');
|
||||
expect(d3format('.2efd2.ef.2.e', 1237)).toBe('1237 (Invalid format: .2efd2.ef.2.e)');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -48,7 +48,7 @@ describe('utils', () => {
|
||||
});
|
||||
it('returns a working formatter', () => {
|
||||
expect(d3FormatPreset('smart_date')(0)).toBe('1970');
|
||||
expect(d3FormatPreset('%%GIBBERISH')(0)).toBe('ERROR');
|
||||
expect(d3FormatPreset('%%GIBBERISH')(0)).toBe('0 (Invalid format: %%GIBBERISH)');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user