Search code examples
javascriptangularjasminekarma-jasminekarma-runner

"Schema validation failed with the following errors: Data path "" should have required property 'karmaConfig' error on running "ng test" - angular


I have been developing with angular with quite some time now but I have never ever written unit tests for any of my angular applications. I'm new to unit testing and was looking to get started with unit testing when I came across this issue.

With my angular application setup and based on the documentation I ran "ng test" to explore how the test works but I'm running in to the following error: "

Schema validation failed with the following errors:
  Data path "" should have required property 'karmaConfig'.

" I'm unable to run anything or move forward because of this enter image description here

Any help would be appreciated!


Solution

  • My app had multiple configurations to integrate with depending on the environment so I just had to just run ng test with the following flag.

    ng test --configuration=local