puppeteer/packages/ng-schematics
Nikolay Vitkov 86abe68849
chore: Add Mocha option to ng-schematic (#9259)
**What kind of change does this PR introduce?**

Adds Mocha as option for `ng-schematics`

**Did you add tests for your changes?**

Yes

**If relevant, did you update the documentation?**

No

**Summary**

User want a simple solution for the Testing library of their choose 

**Does this PR introduce a breaking change?**

No

**Other information**
There are some improvements around the Babel that we can make so we
don't have duplicate code and files (In a Feature PR)
2022-11-14 09:30:49 +01:00
..
src/schematics chore: Add Mocha option to ng-schematic (#9259) 2022-11-14 09:30:49 +01:00
test/src chore: Add Mocha option to ng-schematic (#9259) 2022-11-14 09:30:49 +01:00
.eslintignore chore: Add Jest as a ng-schematics option (#9257) 2022-11-11 14:38:52 +01:00
.gitignore chore(ng-schematics): Add Angular Schematics (#9222) 2022-11-09 14:52:10 +01:00
.mocharc.cjs chore(ng-schematics): Add Angular Schematics (#9222) 2022-11-09 14:52:10 +01:00
copySchemaFiles.js chore(ng-schematics): Add Angular Schematics (#9222) 2022-11-09 14:52:10 +01:00
package-lock.json chore(ng-schematics): Add Angular Schematics (#9222) 2022-11-09 14:52:10 +01:00
package.json chore: Add Jest as a ng-schematics option (#9257) 2022-11-11 14:38:52 +01:00
README.md chore(ng-schematics): Add Angular Schematics (#9222) 2022-11-09 14:52:10 +01:00
tsconfig.json chore(ng-schematics): Add Angular Schematics (#9222) 2022-11-09 14:52:10 +01:00
tsconfig.spec.json chore(ng-schematics): Add Angular Schematics (#9222) 2022-11-09 14:52:10 +01:00

Puppeteer Schematics Angular

This schematics provide a simple set up of Puppeteer for an Angular project.

Usage

Run the command in an Angular CLI app directory. Note this will add the schematic as a dependency to your project.

ng add puppetter-schematics

With the schematics installed, you can run E2E tests with your chose:

npm run e2e
# or yarn e2e

Unit Testing

The schematics utilize @angular-devkit/schematics/testing for verifying correct file creation and package.json updates. To execute the test suit:

npm run test