Based on the Angular Basics v14: Starter Project
npx degit chromaui/ng-storybook-workshop#start
cd ng-storybook-workshop
yarn
Run yarn storybook
to start Storybook locally and output the address. Depending on your system configuration, it will automatically open the address in a new browser tab.
While Storybook is running, open a new terminal window and run the test-runner with: yarn test-storybook
.
Storybook test runner turns all of your stories into executable tests. It is powered by Jest and Playwright.
- For those without a play function: it verifies whether the story renders without any errors.
- For those with a play function: it also checks for errors in the play function and that all assertions passed.
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The application will automatically reload if you change any of the source files.
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI Overview and Command Reference page.