-
Run this command: npm i electron wallaby-webpack angular2-template-loader --save-dev
-
Put the wallaby.js and wallabyTest.ts in this repo in your root workspace folder.
-
Edit wallaby.js at line 6 & 7 to suit your folder names
require('./apps/myapp/tsconfig.spec.json').compilerOptions,
require('./libs/mylib/tsconfig.spec.json').compilerOptions;
- Edit wallaby.js at line 46 to suit your Alias(es) (see App Aliases and Wallaby.js #30)
alias: {
'@myworkspacename/mylib': path.join(
wallaby.projectCacheDir,
'libs/mylib/src/index.ts'
)
}
Forked from https://github.com/chgc/angular-nx-wallaby
Wallaby wasn't happy with the provided wallaby.js config (from the repo above) after Nrwl Nx Release 6.1.0
so I've created this new version.
...Wallaby now runs! @ArtemGovorov updated the wallaby.js config for new pattern for e2e tests to exclude them correctly. Thanks Artem.
ng new myworkspacename --collection=@nrwl/schematics
npm i electron wallaby-webpack angular2-template-loader --save-dev
ng generate lib mylib
cd libs/mylib/src/lib
ng g c lib-test
...then added to app.component.html, and wired up the dependencies to app.module and app.component.spec
ng test myapp # passes
ng test mylib # passes
npm install --save-dev css-loader
...added alias to wallaby.js (as per App Aliases and Wallaby.js #30) alias: { '@myworkspacename/mylib': path.join( wallaby.projectCacheDir, 'libs/mylib/src/index.ts' ) }
My post: Cannot find module "./browser/algorithms.json" #1749 Other references: Angular NX config? #1347
This project was generated with Angular CLI using Nrwl Nx.
Nx is an open source toolkit for enterprise Angular applications.
Nx is designed to help you create and build enterprise grade Angular applications. It provides an opinionated approach to application project structure and patterns.
Run ng serve --app=myapp
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Run ng test
to execute the unit tests via Karma.