Skip to content

Commit 3a38836

Browse files
committed
WIP
1 parent 7257c67 commit 3a38836

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

apps/test-app/scripts/fake-tests.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,20 @@ const metro = spawn("npx", ["react-native", "start", "--no-interactive"], {
1616
env,
1717
});
1818

19+
process.once("SIGTERM", () => {
20+
console.log("Received SIGTERM, shutting down metro server...");
21+
metro.kill();
22+
});
23+
1924
// Create a client, which will automatically connect to the server on the default port (8090)
2025
const client = new Client({
2126
// Called when the server asks the client to run
2227
tests: () => {
2328
// write your tests here or require a package that calls the mocha globals
2429
describe("my thing", () => {
25-
it("works", () => {
30+
it("works", async () => {
2631
// yay!
32+
await new Promise((resolve) => setTimeout(resolve, 1000));
2733
});
2834
});
2935
},

0 commit comments

Comments
 (0)