chore: refactor tests (#3243)
This commit is contained in:
@@ -274,7 +274,11 @@ Deno.test("migrates to last_shown property", async () => {
|
||||
stdout: "piped",
|
||||
}).output();
|
||||
|
||||
const { stdout } = getStdOutput(out);
|
||||
const { stdout, stderr } = getStdOutput(out);
|
||||
if (stdout === "") {
|
||||
// deno-lint-ignore no-console
|
||||
console.log(stderr);
|
||||
}
|
||||
expect(stdout).toMatch(/Fresh .* is available/);
|
||||
|
||||
const checkFileAfter = JSON.parse(
|
||||
|
||||
@@ -95,13 +95,15 @@ export async function withBrowser(fn: (page: Page) => void | Promise<void>) {
|
||||
}
|
||||
}
|
||||
|
||||
export interface TestChildServerOptions {
|
||||
cwd: string;
|
||||
args: string[];
|
||||
bin?: string;
|
||||
env?: Record<string, string>;
|
||||
}
|
||||
|
||||
export async function withChildProcessServer(
|
||||
options: {
|
||||
cwd: string;
|
||||
args: string[];
|
||||
bin?: string;
|
||||
env?: Record<string, string>;
|
||||
},
|
||||
options: TestChildServerOptions,
|
||||
fn: (address: string) => void | Promise<void>,
|
||||
) {
|
||||
const aborter = new AbortController();
|
||||
|
||||
Reference in New Issue
Block a user