You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create tests that auto generate and clean up new projects and validates them to verify that files were generated correctly.
Because of our CLI's interactive nature, you will need to use mock-stdin to simulate input programatically when required such as during discord token input. Feel free to use shortcut options to avoid make things easier, such as --typescript or --javascript to skip the first step.
Preparation
You will need to generate various Robo projects for this. Unlike the API tests where the servers were created and started prior to the tests, these should be created during the test itself. That means that each test will create a new robo project for the things being tested specifically.
Once all tests are done running, you will need to delete the projects generated. It may also help to clean before the entire suite runs. I propose using packages/create-robo/__tests__/projects as the directory to generate these in.
Tests
Verify all of the generated files with each of the below tests, such as default example files, configuration, generated features, credentials (.env), .gitignore, etc.
Use npx for all of these tests, except for those under the Package Managers section.
Common
Plain Javascript: JavaScript, zero features, and credentials.
Plain TypeScript: TypeScript, zero features, and credentials.
Standard JavaScript: JavaScript, recommended features, and credentials.
Standard TypeScript: TypeScript, recommended features, and credentials.
Skipped Credentials JS: JavaScript, recommended features, and skip credentials.
Skipped Credentials TS: TypeScript, recommended features, and skip credentials.
Standard JS Plugin: Same as Standard JS but as a plugin.
Standard TS Plugin: Same as Standard TS but as a plugin.
Package Managers
PNPM: Same as Standard TS but started via pnpx.
Yarn: Same as Standard TS but started via yarn create.
Bun: Same as Standard TS but started via bunx.
Special
Plugins: Same as Standard TS but with the api and ai plugins installed.
Custom Template: Create new project from this repo's typescript template. (-t)
Robo Version: Same as Standard TS but using a specific version of Robo.js.
No Install: Same as Standard TS minus the installation of dependencies. (-ni)
Remember to test the creation of combo-specific files for some of these tests. For example, the standard tests should validate Prettier and ESLint files. Similarly, other tests like Plugins should validate the difference in documentation generated alongside the correct config.
The text was updated successfully, but these errors were encountered:
Create tests that auto generate and clean up new projects and validates them to verify that files were generated correctly.
Because of our CLI's interactive nature, you will need to use mock-stdin to simulate input programatically when required such as during discord token input. Feel free to use shortcut options to avoid make things easier, such as
--typescript
or--javascript
to skip the first step.Preparation
You will need to generate various Robo projects for this. Unlike the API tests where the servers were created and started prior to the tests, these should be created during the test itself. That means that each test will create a new robo project for the things being tested specifically.
Once all tests are done running, you will need to delete the projects generated. It may also help to clean before the entire suite runs. I propose using
packages/create-robo/__tests__/projects
as the directory to generate these in.Tests
Verify all of the generated files with each of the below tests, such as default example files, configuration, generated features, credentials (.env), .gitignore, etc.
Use
npx
for all of these tests, except for those under the Package Managers section.Common
Package Managers
pnpx
.yarn create
.bunx
.Special
api
andai
plugins installed.-t
)-ni
)Remember to test the creation of combo-specific files for some of these tests. For example, the standard tests should validate Prettier and ESLint files. Similarly, other tests like Plugins should validate the difference in documentation generated alongside the correct config.
The text was updated successfully, but these errors were encountered: