Geocld / sparkee

A publish tool for monorepo,just like lerna but support pnpm.
3 stars 0 forks source link

feat: add `cli` tests #11

Open jrson83 opened 1 year ago

jrson83 commented 1 year ago

We should add vitest cases for testing the cli stdout/stdin. For that purpose each cli command must be it's own module. I think this is also good practice, cause it will have 1:1 the same file structure like the core/ folder.

sparkee/
└── src/
    ├── commands/
    │   ├── index.ts # exports all commands
    │   ├── info.ts
    │   ├── init-cliff.ts
    │   ├── init.ts
    │   ├── log.ts
    │   ├── publish.ts
    │   └── run.ts
    ├── common/
    ├── core/
    ├── types/
    ├── utils/
    └── index.ts
Geocld commented 1 year ago

@jrson83 That is a good idea! I will refactor code base your advise on a new branch.

jrson83 commented 1 year ago

@Geocld oh I have it done already, also the tests. Give me some more time then I will create a PR.