aboutsummaryrefslogtreecommitdiff
path: root/types
diff options
context:
space:
mode:
authorCashew <52880648+Scrub1492@users.noreply.github.com>2024-01-06 08:00:37 +0700
committerGitHub <noreply@github.com>2024-01-06 01:00:37 +0000
commit60276d41ffd90044acc2f95e70b9b0c9a770417a (patch)
tree0bd08871a14d025007ba5453691b27976c39d77d /types
parentd17ca4b2ff6e6f359dc5ea72c133f99fb016effd (diff)
Test updates (#501)
* update tests * japanese-util updates * update json-schema tests
Diffstat (limited to 'types')
-rw-r--r--types/test/core.d.ts38
1 files changed, 38 insertions, 0 deletions
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 <https://www.gnu.org/licenses/>.
+ */
+
+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;
+}[];