Skip to content

Commit

Permalink
Test: Fix project setup to include tests in testing/ subdirectory
Browse files Browse the repository at this point in the history
The previous angular configuration only compiled the src/ directory,
completely ignoring testing/, which caused the tests therein to never execute.

The fix pulls up the ‘root’ directory by one level, so both src/ and testing/
are included.  It also limits the compilation to those two, exclusively, in
order to not run the specs projects/demo and projects/schematics.
These are tested by dedicated scripts.
  • Loading branch information
bleistift-zwei authored and devoto13 committed May 9, 2024
1 parent bf0da1b commit 6b8238a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"angular-fontawesome": {
"projectType": "library",
"root": "",
"sourceRoot": "src",
"sourceRoot": ".",
"prefix": "fa",
"architect": {
"build": {
Expand All @@ -26,6 +26,10 @@
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"include": [
"src/**/*.spec.ts",
"testing/**/*.spec.ts"
],
"polyfills": ["zone.js", "zone.js/testing"],
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js"
Expand Down

0 comments on commit 6b8238a

Please sign in to comment.