Skip to content

Commit

Permalink
test: add pdp method
Browse files Browse the repository at this point in the history
  • Loading branch information
ankur-arch committed May 17, 2024
1 parent efe4a4d commit bb16d1a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default class Cli {

// Collect user input
if (!this.args.folder.length) {
const projects = await prompts.selectOrmOrPDP()
const projects = await prompts.selectORMorPDP()
if( projects !== "orm" ) {
this.args.folder = projects;
} else {
Expand Down
4 changes: 2 additions & 2 deletions src/cli/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const getTemplate = async (projects: string[]): Promise<string> => {
return template;
};

const selectOrmOrPDP = async (): Promise<string> => {
const selectORMorPDP = async (): Promise<string> => {
logger.success(
`\nThese options correspond to the root directories in the prisma-examples repository:\n`,
);
Expand Down Expand Up @@ -142,7 +142,7 @@ const getProjectDirectory = async (): Promise<string> => {
};

export default {
selectOrmOrPDP,
selectORMorPDP,
getInstallSelection,
getProjectDirectory,
getProjectName,
Expand Down
1 change: 1 addition & 0 deletions test/cli/input-collector.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ vi.mock("../../src/cli/prompts", () => ({
getProjectName: async () => "projectName",
getProjectDirectory: async () => "lskdjf",
getRootDir: async () => "javascript",
selectORMorPDP: async () => "orm"
},
}));

Expand Down

0 comments on commit bb16d1a

Please sign in to comment.