angular/tools/saucelabs-daemon/ipc-messages.ts
Joey Perrott dc62446ef7 refactor: migrate tools to prettier formatting (#53947)
Migrate formatting to prettier for tools directory from clang-format

PR Close #53947
2024-01-16 19:17:49 -08:00

39 lines
1.2 KiB
TypeScript

/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/** Message that can be sent to the daemon to start a given test. */
export class StartTestMessage {
readonly type = 'start-test';
constructor(
public url: string,
public browserId: string,
public testDescription: string,
) {}
}
/** Message that can be sent to the daemon if a test completed. */
export class EndTestMessage {
readonly type = 'end-test';
}
/** Message being sent from the daemon if a request browser is not available. */
export class NoAvailableBrowserMessage {
readonly type = 'browser-not-ready';
}
/** Message that indicates an internal error in background service. */
export class InternalErrorMessage {
readonly type = 'internal-error';
constructor(public msg: string) {}
}
/** Type of messages the background service can receive. */
export type BackgroundServiceReceiveMessages = StartTestMessage | EndTestMessage;
/** Type of messages the background services can send to clients. */
export type BackgroundServiceSendMessages = NoAvailableBrowserMessage | InternalErrorMessage;