Run date formatter test on unix only
Summary: The test added in D41342194 (f1cbe7ed79) fails on Windows: https://github.com/facebook/flipper/actions/runs/3489945702/jobs/5840723948 Turns out this is a known issue:1adcf2bc68/desktop/flipper-plugin-core/src/utils/__tests__/shallowSerialization.node.tsx (L228)So, following the advice there and running it on unix only. Reviewed By: lawrencelomax Differential Revision: D41403510 fbshipit-source-id: e08ce4be58adf0547bffec50850c7c259b4e33d5
This commit is contained in:
committed by
Facebook GitHub Bot
parent
1adcf2bc68
commit
85fe53a9e2
@@ -21,9 +21,6 @@ test('default formatter', () => {
|
|||||||
expect(
|
expect(
|
||||||
DataFormatter.format(new Date(2020, 2, 3, 5, 8, 4, 244654)),
|
DataFormatter.format(new Date(2020, 2, 3, 5, 8, 4, 244654)),
|
||||||
).toMatchInlineSnapshot(`"05:12:08.654"`);
|
).toMatchInlineSnapshot(`"05:12:08.654"`);
|
||||||
expect(
|
|
||||||
DataFormatter.format(new Date(1668609938.068577 * 1000)),
|
|
||||||
).toMatchInlineSnapshot(`"01:45:38.068"`);
|
|
||||||
expect(DataFormatter.format('test')).toMatchInlineSnapshot(`"test"`);
|
expect(DataFormatter.format('test')).toMatchInlineSnapshot(`"test"`);
|
||||||
|
|
||||||
expect(DataFormatter.format({hello: 'world'})).toMatchInlineSnapshot(`
|
expect(DataFormatter.format({hello: 'world'})).toMatchInlineSnapshot(`
|
||||||
@@ -74,6 +71,13 @@ test('default formatter', () => {
|
|||||||
`);
|
`);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test.unix('date formatter', () => {
|
||||||
|
// dates on windows don't support changed timezones
|
||||||
|
expect(
|
||||||
|
DataFormatter.format(new Date(1668609938.068577 * 1000)),
|
||||||
|
).toMatchInlineSnapshot(`"01:45:38.068"`);
|
||||||
|
});
|
||||||
|
|
||||||
test('linkify formatter', () => {
|
test('linkify formatter', () => {
|
||||||
const linkify = (value: any) =>
|
const linkify = (value: any) =>
|
||||||
DataFormatter.format(value, DataFormatter.linkify);
|
DataFormatter.format(value, DataFormatter.linkify);
|
||||||
|
|||||||
Reference in New Issue
Block a user