analogjs / analog

The fullstack meta-framework for Angular. Powered by Vite and Nitro
https://analogjs.org
MIT License
2.5k stars 240 forks source link

Testing: Add E2E project for create-analog #201

Closed brandonroberts closed 1 year ago

brandonroberts commented 1 year ago

Which scope/s are relevant/related to the feature request?

create-analog

Information

Need an E2E test that ensures create-analog generates a working application. This would help ensure against upgrades with external dependencies like Nx and the @nrwl/vite package.

The E2E test would:

Describe any alternatives/workarounds you're currently using

No response

I would be willing to submit a PR to fix this issue

goetzrobin commented 1 year ago

I think the nx-plugin-e2e can serve as a blueprint for that. There's a method that allows us to run not just Nx commands!

brandonroberts commented 1 year ago

Yep. We can run direct CLI commands also

 import { ensureDirSync } from 'fs-extra';
 import { runCommand, tmpProjPath } from '@nrwl/nx-plugin';

 ensureDirSync(tmpProjPath());
 runCommand(`yarn create analog test-project`);
 // ...
brandonroberts commented 1 year ago

Fixed in https://github.com/analogjs/analog/pull/478