Run wilde on iOS emulator during electron tests
Summary: Before running the test suite, build wilde and run it on a local emulator. This takes about 15 mins on a lego-mac with a warm cache. It's probably worth splitting out the normal unit tests into a separate job, so we get quicker feedback on them. I'll do that in a separate diff. Lets run this for a while, and see how it goes, I'm wondering if it might get flaky because it will be building the master version of wilde, so potentially could be broken a lot, though it's passed evry time I've tried it so far. If it's reliable, we can run the same thing with loads of other apps in parallel. Reviewed By: passy Differential Revision: D10110408 fbshipit-source-id: 61c549eb1b9d04729dcb5ed01271a484af4777f5
This commit is contained in:
committed by
Facebook Github Bot
parent
344e6e7a04
commit
eebff1eb88
@@ -26,18 +26,31 @@ beforeAll(() => {
|
|||||||
test('servers starting at ports', done => {
|
test('servers starting at ports', done => {
|
||||||
const serversToBeStarted = new Set([SECURE_PORT, INSECURE_PORT]);
|
const serversToBeStarted = new Set([SECURE_PORT, INSECURE_PORT]);
|
||||||
|
|
||||||
server.addListener('listening', port => {
|
return new Promise((resolve, reject) => {
|
||||||
if (!serversToBeStarted.has(port)) {
|
server.addListener('listening', port => {
|
||||||
done.fail(Error(`unknown server started at port ${port}`));
|
if (!serversToBeStarted.has(port)) {
|
||||||
} else {
|
throw Error(`unknown server started at port ${port}`);
|
||||||
serversToBeStarted.delete(port);
|
} else {
|
||||||
}
|
serversToBeStarted.delete(port);
|
||||||
if (serversToBeStarted.size === 0) {
|
}
|
||||||
done();
|
if (serversToBeStarted.size === 0) {
|
||||||
}
|
done();
|
||||||
|
resolve();
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test(
|
||||||
|
'Layout plugin is connecting',
|
||||||
|
done => {
|
||||||
|
server.addListener('new-client', (client: Client) => {
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
10000,
|
||||||
|
);
|
||||||
|
|
||||||
afterAll(() => {
|
afterAll(() => {
|
||||||
server.close();
|
server.close();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user