pokerogue/scripts/create-test/constants.js
Bertie690 3478e09923
[Dev] Break up test:create script; add help message, file name CLI argument support (#6793)
* [Dev] Broke up `test:create` script, added CLI args file name suppoert

* Moved `HELP_FLAGS` constant; fixed help msg indentation

* ran biome

* Fix floting promise err

* Added REUSE info

* Typo fix

* comment out reward boilerplate

* Removed redundant comments

---------

Co-authored-by: fabske0 <192151969+fabske0@users.noreply.github.com>
2025-11-28 21:26:49 +00:00

48 lines
1.1 KiB
JavaScript

/*
* SPDX-FileCopyrightText: 2024-2025 Pagefault Games
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
/**
* Array containing all valid options for the type of test file to create.
* @package
*/
export const validTestTypes = /** @type {const} */ ([
"Move",
"Ability",
"Item",
"Reward",
"Mystery Encounter",
"Utils",
"UI",
]);
/**
* @typedef {typeof validTestTypes[number]}
* testType
* Union type representing a single valid choice of test type.
*/
/**
* Const object mapping each test type to any additional names they can be used with from CLI.
* @satisfies {Partial<Record<testType, readonly string[]>>}
*/
export const cliAliases = /** @type {const} */ ({
"Mystery Encounter": ["ME"],
});
/**
* Const object matching all test types to the directories in which their tests reside.
* @satisfies {Record<testType, string>}
*/
export const testTypesToDirs = /** @type {const} */ ({
Move: "moves",
Ability: "abilities",
Item: "items",
Reward: "rewards",
"Mystery Encounter": "mystery-encounter/encounters",
Utils: "utils",
UI: "ui",
});