Download tests/converters/helpers/commonTests.ts from linuxrun/convert: direct link, hf CLI and curl.
- Browser
- Download file 769 Bytes
-
https://huggingface.co/spaces/linuxrun/convert/resolve/main/tests/converters/helpers/commonTests.ts
- Command line
-
hf download hf://spaces/linuxrun/convert/tests/converters/helpers/commonTests.ts
-
curl -L -o commonTests.ts https://huggingface.co/spaces/linuxrun/convert/resolve/main/tests/converters/helpers/commonTests.ts
769 Bytes
| import { test } from "bun:test"; | |
| import { ConvertFnWithExecFile } from "../../../src/converters/types"; | |
| import { | |
| runConvertFailTest, | |
| runConvertLogsStderror, | |
| runConvertLogsStderrorAndStdout, | |
| runConvertSuccessTest, | |
| } from "./converters"; | |
| export function runCommonTests(convert: ConvertFnWithExecFile) { | |
| test("convert resolves when execFile succeeds", async () => { | |
| await runConvertSuccessTest(convert); | |
| }); | |
| test("convert rejects when execFile fails", async () => { | |
| await runConvertFailTest(convert); | |
| }); | |
| test("convert logs stderr when present", async () => { | |
| await runConvertLogsStderror(convert); | |
| }); | |
| test("convert logs both stderr and stdout when present", async () => { | |
| await runConvertLogsStderrorAndStdout(convert); | |
| }); | |
| } | |