Add option to jest to run tests only locally, or on linux (#2609)

Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/2609

Make it possible to mark some tests to run on non-CI, or unix only

Reviewed By: nikoant

Differential Revision: D29813506

fbshipit-source-id: 140f8a4eaed5af3282ab9d139b46a52818be0934
This commit is contained in:
Michel Weststrate
2021-07-21 05:42:00 -07:00
committed by Facebook GitHub Bot
parent 3f7e3c0441
commit a78b6124d7
7 changed files with 65 additions and 8 deletions

View File

@@ -71,8 +71,7 @@ test('can manually collapse properties', async () => {
});
});
// TODO(T95985157): Flaky in open source.
test.skip('can filter for data', async () => {
test.local('can filter for data', async () => {
const res = render(
<DataInspector data={json} collapsed={false} expandRoot />,
);

View File

@@ -225,8 +225,10 @@ test('test serialize and deserializeShallowObject function for non Object input'
);
});
if (process.platform !== 'win32') {
test('test makeObjectSerializable and deserializeShallowObject function for Date input', () => {
// dates on windows don't support changed timezones
test.unix(
'test makeObjectSerializable and deserializeShallowObject function for Date input',
() => {
const date = new Date(2021, 1, 29, 10, 31, 7, 205);
expect(makeShallowSerializable(date)).toMatchInlineSnapshot(`
Object {
@@ -237,8 +239,8 @@ if (process.platform !== 'win32') {
expect(deserializeShallowObject(makeShallowSerializable(date))).toEqual(
date,
);
});
}
},
);
test('test makeObjectSerializable and deserializeShallowObject function for Map of Sets', () => {
const map = new Map([