"Failed: No provider for TestingCompilerFactory!"

239 Views Asked by At

I have followed the instructions here https://github.com/wallabyjs/ngCliWebpackSample to get an example angular-cli app running with wallabyjs.

I can run the tests via 'npm run test' and all works fine with the 3 tests included passing.

However, I get the following error if I run wallabyjs:

AppComponent should render title in a h1 tag​​​​ ​​​[16 ms]​​​​
    ​​​​
    ​​Failed: No provider for TestingCompilerFactory!​​
      at Object.<anonymous> ​src/app/app.component.spec.ts:9:4​
    ​​​​
    ​​Failed: No provider for TestingCompilerFactory!​​
      at Object.<anonymous> ​src/app/app.component.spec.ts:29:4​

  ​​​​AppComponent should have as title 'app'​​​​ ​​​[14 ms]​​​​
    ​​​​
    ​​Failed: No provider for TestingCompilerFactory!​​
      at Object.<anonymous> ​src/app/app.component.spec.ts:9:4​
    ​​​​
    ​​Failed: No provider for TestingCompilerFactory!​​
      at Object.<anonymous> ​src/app/app.component.spec.ts:23:4​

  ​​​​AppComponent should create the app​​​​ ​​​[9 ms]​​​​
    ​​​​
    ​​Failed: No provider for TestingCompilerFactory!​​
      at Object.<anonymous> ​src/app/app.component.spec.ts:9:4​
    ​​​​
    ​​Failed: No provider for TestingCompilerFactory!​​
      at Object.<anonymous> ​src/app/app.component.spec.ts:17:4​

..I've npm installed and installed the latest webpack, electron etc. globally.

0

There are 0 best solutions below