Skip to content

Commit

Permalink
cleanup test boilerplate script
Browse files Browse the repository at this point in the history
  • Loading branch information
torranx committed Oct 2, 2024
1 parent 7473c31 commit 45ecf05
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions create-test-boilerplate.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
/**
* This script creates a test boilerplate file for a move or ability.
* @param {string} type - The type of test to create. Either "move", "ability",
* or "item".
* @param {string} fileName - The name of the file to create.
* @example npm run create-test move tackle
* This script creates a test boilerplate file in the appropriate
* directory based on the type selected.
* @example npm run create-test
*/

import fs from "fs";
Expand Down Expand Up @@ -34,7 +32,7 @@ async function promptTestType() {
console.log("Exiting...");
return process.exit();
} else if (!typeChoices.includes(typeAnswer.selectedOption)) {
console.error('Please provide a valid type ("move", "ability", or "item")!');
console.error(`Please provide a valid type (${typeChoices.join(", ")})!`);
return await promptTestType();
}

Expand Down Expand Up @@ -102,7 +100,7 @@ async function runInteractive() {
description = `Mystery Encounter - ${formattedName}`;
break;
default:
console.error('Invalid type. Please use "move", "ability", or "item".');
console.error(`Invalid type. Please use one of the following: ${typeChoices.join(", ")}.`);
process.exit(1);
}

Expand Down

0 comments on commit 45ecf05

Please sign in to comment.