From 22e71e2c875cee4203b4266f75438b6a0b56b530 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Wed, 27 Dec 2023 12:30:02 -0500 Subject: [PATCH] Remove unused test function --- test/fixtures/custom-data-test.js | 37 ------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 test/fixtures/custom-data-test.js diff --git a/test/fixtures/custom-data-test.js b/test/fixtures/custom-data-test.js deleted file mode 100644 index be2cd14c53..0000000000 --- a/test/fixtures/custom-data-test.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2023 Yomitan Authors - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -import {test} from 'vitest'; - -/** - * @template [TCustomData=unknown] - * @param {() => (TCustomData|Promise)} createCustomData - * @param {(data: TCustomData) => (void|Promise)} [disposeCustomData] - * @returns {import('vitest').TestAPI<{custom: {data: TCustomData}}>} - */ -export function createCustomDataTest(createCustomData, disposeCustomData) { - return test.extend({ - // eslint-disable-next-line no-empty-pattern - custom: async ({}, use) => { - const data = await createCustomData(); - await use({data}); - if (typeof disposeCustomData === 'function') { - disposeCustomData(data); - } - } - }); -}