Fix Windows test (#2682)

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

Run path-specific tests only on Unix-like OSes. We could
easily change the path to Windows, but honestly it's enough
to confirm this on one platform.

Reviewed By: timur-valiev

Differential Revision: D30255014

fbshipit-source-id: 7db36bc1738d721625e3c86c210d46dfaf8f0ab8
This commit is contained in:
Pascal Hartig
2021-08-11 14:34:10 -07:00
committed by Facebook GitHub Bot
parent 7df77e2620
commit eb27796571

View File

@@ -94,17 +94,20 @@ test('throws if no iOS support', async () => {
);
});
test('uses xcrun to take screenshots with no idb when xcode is detected', async () => {
const ib = await makeIOSBridge('', true);
test.unix(
'uses xcrun to take screenshots with no idb when xcode is detected',
async () => {
const ib = await makeIOSBridge('', true);
ib.screenshot('deadbeef');
ib.screenshot('deadbeef');
expect(exec).toHaveBeenCalledWith(
'xcrun simctl io deadbeef screenshot /temp/00000000-0000-0000-0000-000000000000.png',
);
});
expect(exec).toHaveBeenCalledWith(
'xcrun simctl io deadbeef screenshot /temp/00000000-0000-0000-0000-000000000000.png',
);
},
);
test('uses idb to take screenshots when available', async () => {
test.unix('uses idb to take screenshots when available', async () => {
const ib = await makeIOSBridge('/usr/local/bin/idb', true, async (_) => true);
ib.screenshot('deadbeef');