Update TestHelper type definitions
MODIFY
packages/@romejs-runtime/rome/test.ts
packages/@romejs-runtime/rome/test.ts
@@ -36,14 +36,16 @@ export interface TestHelper {
notThrowsAsync(nonThrower: AsyncFunc, message?: string): Promise<void>;
regex(contents: string, regex: RegExp, message?: string): void;
notRegex(contents: string, regex: RegExp, message?: string): void;
- snapshot(expected: unknown, message?: string, fileName?: string): string;
+ snapshot(expected: unknown, message?: string, fileName?: string): Promise<
+ string
+ >;
snapshotNamed(
name: string,
expected: unknown,
message?: string,
- fileName?: string,
- ): string;
- getSnapshot(snapshotName: string): unknown;
+ filename?: string,
+ ): Promise<string>;
+ getSnapshot(snapshotName: string): Promise<unknown>;
}
export type TestName = string | Array<string>;

MODIFY
packages/@romejs/core/test-worker/TestWorkerRunner.ts
packages/@romejs/core/test-worker/TestWorkerRunner.ts
@@ -411,7 +411,7 @@ export default class TestWorkerRunner {
async prepare(): Promise<void> {
return this.wrap(async () => {
// Setup
- await this.snapshotManager.load();
+ await this.snapshotManager.init();
await this.discoverTests();
await this.emitFoundTests();

Update TestHelper type definitions