Fix Client#generateRageSummary - fixes
ADD
internal/core/client/Client.test.md
+# `Client.test.ts`
+
+**DO NOT MODIFY**. This file has been autogenerated. Run `rome test internal/core/client/Client.test.ts --update-snapshots` to update.
+
+## `Client#generateRageSummary`
+
+### `console`
+
+```
+
+```
+
+### `files`
+
+```
+# .config/rome.json
+{
+ "files": {
+ "vendorPath": "../remote"
+ }
+}
+
+
+```

ADD
internal/core/client/Client.test.ts
+import {test} from "rome";
+import {createIntegrationTest} from "@internal/test-helpers";
+
+test(
+ "Client#generateRageSummary",
+ createIntegrationTest(
+ {},
+ async (t, helper) => {
+ await t.notThrowsAsync(async () => {
+ await helper.client.generateRageSummary();
+ });
+ },
+ ),
+);

MODIFY
internal/core/client/Client.ts
internal/core/client/Client.ts
@@ -616,6 +616,7 @@ export default class Client {
flags: this.getClientJSONFlags(),
}),
bridge.handshake(),
+ bridge.serverReady.wait(),
]);
await this.bridgeAttachedEvent.callOptional(status);

MODIFY
internal/core/common/bridges/ServerBridge.ts
internal/core/common/bridges/ServerBridge.ts
@@ -96,6 +96,11 @@ export default class ServerBridge extends Bridge {
direction: "server->client",
});
+ public serverReady = this.createEvent<void, void>({
+ name: "serverReady",
+ direction: "server->client",
+ });
+
public write = this.createEvent<[string, boolean], void>({
name: "write",
direction: "server->client",

MODIFY
internal/core/server/Server.ts
internal/core/server/Server.ts
@@ -612,6 +612,7 @@ export default class Server {
bridge.endServer.subscribe(async () => this.end());
await this.clientStartEvent.callOptional(client);
+ await bridge.serverReady.call();
return client;
}

Fix Client#generateRageSummary - fixes #931 (#944)