From 60276d41ffd90044acc2f95e70b9b0c9a770417a Mon Sep 17 00:00:00 2001 From: Cashew <52880648+Scrub1492@users.noreply.github.com> Date: Sat, 6 Jan 2024 08:00:37 +0700 Subject: Test updates (#501) * update tests * japanese-util updates * update json-schema tests --- types/test/core.d.ts | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 types/test/core.d.ts (limited to 'types/test') diff --git a/types/test/core.d.ts b/types/test/core.d.ts new file mode 100644 index 00000000..c01737e6 --- /dev/null +++ b/types/test/core.d.ts @@ -0,0 +1,38 @@ +/* + * 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 . + */ + +type Operation = 'set.defaultValue' | 'setOverride' | 'clearOverride'; + +type DynamicPropertyTestOperation = { + operation: Operation | null; + expectedDefaultValue: number; + expectedValue: number; + expectedOverrideCount: number; + expectedEventOccurred: boolean; + args: [value: number, priority?: number]; +}; + +export type DynamicPropertyTestData = { + initialValue: number; + operations: DynamicPropertyTestOperation[]; +}[]; + +export type DeepEqualTestData = { + value1: unknown; + value2: unknown; + expected: boolean; +}[]; -- cgit v1.2.3