Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve scaffold command #66

Open
Igmat opened this issue Mar 23, 2018 · 0 comments
Open

Improve scaffold command #66

Igmat opened this issue Mar 23, 2018 · 0 comments
Projects
Milestone

Comments

@Igmat
Copy link
Owner

Igmat commented Mar 23, 2018

Existing scaffold command is only proof-of-concept, its quality has to be dramatically improved.

Core features

  1. Create additional usages without optional parameters (as it already does for TypeScript signature overloads).
  2. Detect re-exports and skip them (this behavior could be optional).
  3. Options for including usual variables in specs (for now it includes only classes and functions).
  4. Don't skip files, when related spec exists, but look for uncovered exports and add them (this feature required for workflow mode(Watch/Workflow mode #65)).
  5. Correctly analyze ES3, ES5 and ESNext (now it works only with TypeScript).

Randomizing

  1. It has to support more data-types for randomizing arguments (for now only string and number works).
  2. This randomizing also has to be more intelligent, by using argument name for creating most suitable value (e.g. real name if argument is called firstName) - this feature has a lot of room for improvements (e.g. using context in addition to name), so in first release it doesn't required to be perfect but it has to be extensible.

Configuration

  1. Use configured resolvers for specific exports (it requires additional API for resolvers).
  2. Use configuration for creating specs in correct format and path instead of existing .spec.ts approach.

--lookForUsages

It also needs additional flag (e.g. --lookForUsages) that is set to false by default and does nothing in this case, but if it's set to true scaffolder has to use typescript compiler's API for finding references in project (like it does for building code-lens in VS Code) and use them as spec code in addition to usual randomizing approach (which will add usages ONLY for uncovered parts).

This feature will be extremely useful for adding baset in existing projects.

@Igmat Igmat added this to the v1.0.0 milestone Mar 23, 2018
@Igmat Igmat added this to To Do in Baset board via automation Mar 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Baset board
  
To Do
Development

No branches or pull requests

1 participant