mirror of
https://github.com/C4illin/ConvertX.git
synced 2025-10-23 04:52:18 +00:00
test: fix imports after eslint config changes
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { execFile as execFileOriginal } from "node:child_process";
|
||||
import { ExecFileFn } from "./types.ts";
|
||||
import { ExecFileFn } from "./types";
|
||||
|
||||
export const properties = {
|
||||
from: {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { execFile as execFileOriginal } from "node:child_process";
|
||||
import { ExecFileFn } from "./types.ts";
|
||||
import { ExecFileFn } from "./types";
|
||||
|
||||
export const properties = {
|
||||
from: {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { execFile as execFileOriginal } from "node:child_process";
|
||||
import { ExecFileFn } from "./types.ts";
|
||||
import { ExecFileFn } from "./types";
|
||||
|
||||
export const properties = {
|
||||
from: {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { execFile as execFileOriginal } from "node:child_process";
|
||||
import { ExecFileFn } from "./types.ts";
|
||||
import { ExecFileFn } from "./types";
|
||||
|
||||
// This could be done dynamically by running `ffmpeg -formats` and parsing the output
|
||||
export const properties = {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { execFile as execFileOriginal } from "node:child_process";
|
||||
import { ExecFileFn } from "./types.ts";
|
||||
import { ExecFileFn } from "./types";
|
||||
|
||||
export const properties = {
|
||||
from: {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { execFile as execFileOriginal } from "node:child_process";
|
||||
import { ExecFileFn } from "./types.ts";
|
||||
import { ExecFileFn } from "./types";
|
||||
|
||||
// declare possible conversions
|
||||
export const properties = {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { execFile as execFileOriginal } from "node:child_process";
|
||||
import { ExecFileFn } from "./types.ts";
|
||||
import { ExecFileFn } from "./types";
|
||||
|
||||
export const properties = {
|
||||
from: {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { execFile as execFileOriginal } from "child_process";
|
||||
import { ExecFileFn } from "./types.ts";
|
||||
import { ExecFileFn } from "./types";
|
||||
|
||||
export const properties = {
|
||||
from: {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { execFile as execFileOriginal } from "node:child_process";
|
||||
import { ExecFileFn } from "./types.ts";
|
||||
import { ExecFileFn } from "./types";
|
||||
|
||||
// declare possible conversions
|
||||
export const properties = {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { execFile as execFileOriginal } from "node:child_process";
|
||||
import { ExecFileFn } from "./types.ts";
|
||||
import { ExecFileFn } from "./types";
|
||||
|
||||
export const properties = {
|
||||
from: {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { execFile as execFileOriginal } from "node:child_process";
|
||||
import { ExecFileFn } from "./types.ts";
|
||||
import { ExecFileFn } from "./types";
|
||||
|
||||
export const properties = {
|
||||
from: {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { execFile as execFileOriginal } from "node:child_process";
|
||||
import { ExecFileFn } from "./types.ts";
|
||||
import { ExecFileFn } from "./types";
|
||||
|
||||
export const properties = {
|
||||
from: {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { execFile as execFileOriginal } from "node:child_process";
|
||||
import { ExecFileFn } from "./types.ts";
|
||||
import { ExecFileFn } from "./types";
|
||||
|
||||
export const properties = {
|
||||
from: {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { execFile as execFileOriginal } from "node:child_process";
|
||||
import { ExecFileFn } from "./types.ts";
|
||||
import { ExecFileFn } from "./types";
|
||||
|
||||
export const properties = {
|
||||
from: {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { execFile as execFileOriginal } from "node:child_process";
|
||||
import { ExecFileFn } from "./types.ts";
|
||||
import { ExecFileFn } from "./types";
|
||||
|
||||
// declare possible conversions
|
||||
export const properties = {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { execFile as execFileOriginal } from "node:child_process";
|
||||
import { ExecFileFn } from "./types.ts";
|
||||
import { ExecFileFn } from "./types";
|
||||
|
||||
export const properties = {
|
||||
from: {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { test } from "bun:test";
|
||||
import { convert } from "../../src/converters/assimp.ts";
|
||||
import { runCommonTests } from "./helpers/commonTests.ts";
|
||||
import { convert } from "../../src/converters/assimp";
|
||||
import { runCommonTests } from "./helpers/commonTests";
|
||||
|
||||
runCommonTests(convert);
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { test } from "bun:test";
|
||||
import { convert } from "../../src/converters/calibre.ts";
|
||||
import { runCommonTests } from "./helpers/commonTests.ts";
|
||||
import { convert } from "../../src/converters/calibre";
|
||||
import { runCommonTests } from "./helpers/commonTests";
|
||||
|
||||
runCommonTests(convert);
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
import type { ExecFileException } from "node:child_process";
|
||||
import { beforeEach, expect, test } from "bun:test";
|
||||
import { convert } from "../../src/converters/dvisvgm.ts";
|
||||
import { ExecFileFn } from "../../src/converters/types.ts";
|
||||
import { runCommonTests } from "./helpers/commonTests.ts";
|
||||
import { convert } from "../../src/converters/dvisvgm";
|
||||
import { ExecFileFn } from "../../src/converters/types";
|
||||
import { runCommonTests } from "./helpers/commonTests";
|
||||
|
||||
let calls: string[][] = [];
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { beforeEach, expect, test } from "bun:test";
|
||||
import { convert } from "../../src/converters/ffmpeg.ts";
|
||||
import { convert } from "../../src/converters/ffmpeg";
|
||||
|
||||
let calls: string[][] = [];
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { test } from "bun:test";
|
||||
import { convert } from "../../src/converters/graphicsmagick.ts";
|
||||
import { runCommonTests } from "./helpers/commonTests.ts";
|
||||
import { convert } from "../../src/converters/graphicsmagick";
|
||||
import { runCommonTests } from "./helpers/commonTests";
|
||||
|
||||
runCommonTests(convert);
|
||||
|
||||
|
@@ -1,11 +1,11 @@
|
||||
import { test } from "bun:test";
|
||||
import { ConvertFnWithExecFile } from "../../../src/converters/types.ts";
|
||||
import { ConvertFnWithExecFile } from "../../../src/converters/types";
|
||||
import {
|
||||
runConvertFailTest,
|
||||
runConvertLogsStderror,
|
||||
runConvertLogsStderrorAndStdout,
|
||||
runConvertSuccessTest,
|
||||
} from "./converters.ts";
|
||||
} from "./converters";
|
||||
|
||||
export function runCommonTests(convert: ConvertFnWithExecFile) {
|
||||
test("convert resolves when execFile succeeds", async () => {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import type { ExecFileException } from "node:child_process";
|
||||
import { expect } from "bun:test";
|
||||
import { ConvertFnWithExecFile, ExecFileFn } from "../../../src/converters/types.ts";
|
||||
import { ConvertFnWithExecFile, ExecFileFn } from "../../../src/converters/types";
|
||||
|
||||
export async function runConvertSuccessTest(convertFn: ConvertFnWithExecFile) {
|
||||
const originalConsoleLog = console.log;
|
||||
|
@@ -1,8 +1,8 @@
|
||||
import type { ExecFileException } from "node:child_process";
|
||||
import { beforeEach, expect, test } from "bun:test";
|
||||
import { convert } from "../../src/converters/imagemagick.ts";
|
||||
import { ExecFileFn } from "../../src/converters/types.ts";
|
||||
import { runCommonTests } from "./helpers/commonTests.ts";
|
||||
import { convert } from "../../src/converters/imagemagick";
|
||||
import { ExecFileFn } from "../../src/converters/types";
|
||||
import { runCommonTests } from "./helpers/commonTests";
|
||||
|
||||
let calls: string[][] = [];
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { test } from "bun:test";
|
||||
import { convert } from "../../src/converters/inkscape.ts";
|
||||
import { runCommonTests } from "./helpers/commonTests.ts";
|
||||
import { convert } from "../../src/converters/inkscape";
|
||||
import { runCommonTests } from "./helpers/commonTests";
|
||||
|
||||
runCommonTests(convert);
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { test } from "bun:test";
|
||||
import { convert } from "../../src/converters/libheif.ts";
|
||||
import { runCommonTests } from "./helpers/commonTests.ts";
|
||||
import { convert } from "../../src/converters/libheif";
|
||||
import { runCommonTests } from "./helpers/commonTests";
|
||||
|
||||
runCommonTests(convert);
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
import type { ExecFileException } from "node:child_process";
|
||||
import { beforeEach, expect, test } from "bun:test";
|
||||
import { convert } from "../../src/converters/libjxl.ts";
|
||||
import { ExecFileFn } from "../../src/converters/types.ts";
|
||||
import { runCommonTests } from "./helpers/commonTests.ts";
|
||||
import { convert } from "../../src/converters/libjxl";
|
||||
import { ExecFileFn } from "../../src/converters/types";
|
||||
import { runCommonTests } from "./helpers/commonTests";
|
||||
|
||||
let command: string = "";
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import type { ExecFileException } from "node:child_process";
|
||||
import { expect, test } from "bun:test";
|
||||
import { convert } from "../../src/converters/msgconvert.ts";
|
||||
import { ExecFileFn } from "../../src/converters/types.ts";
|
||||
import { convert } from "../../src/converters/msgconvert";
|
||||
import { ExecFileFn } from "../../src/converters/types";
|
||||
|
||||
test("convert rejects conversion if input filetype is not msg and output type is not eml", async () => {
|
||||
const mockExecFile: ExecFileFn = (
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { test } from "bun:test";
|
||||
import { convert } from "../../src/converters/potrace.ts";
|
||||
import { runCommonTests } from "./helpers/commonTests.ts";
|
||||
import { convert } from "../../src/converters/potrace";
|
||||
import { runCommonTests } from "./helpers/commonTests";
|
||||
|
||||
runCommonTests(convert);
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { test } from "bun:test";
|
||||
import { convert } from "../../src/converters/resvg.ts";
|
||||
import { runCommonTests } from "./helpers/commonTests.ts";
|
||||
import { convert } from "../../src/converters/resvg";
|
||||
import { runCommonTests } from "./helpers/commonTests";
|
||||
|
||||
runCommonTests(convert);
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
import type { ExecFileException } from "node:child_process";
|
||||
import { beforeEach, expect, test } from "bun:test";
|
||||
import { ExecFileFn } from "../../src/converters/types.ts";
|
||||
import { convert } from "../../src/converters/vips.ts";
|
||||
import { runCommonTests } from "./helpers/commonTests.ts";
|
||||
import { ExecFileFn } from "../../src/converters/types";
|
||||
import { convert } from "../../src/converters/vips";
|
||||
import { runCommonTests } from "./helpers/commonTests";
|
||||
|
||||
let calls: string[][] = [];
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { test } from "bun:test";
|
||||
import { convert } from "../../src/converters/xelatex.ts";
|
||||
import { runCommonTests } from "./helpers/commonTests.ts";
|
||||
import { convert } from "../../src/converters/xelatex";
|
||||
import { runCommonTests } from "./helpers/commonTests";
|
||||
|
||||
runCommonTests(convert);
|
||||
|
||||
|
Reference in New Issue
Block a user