1

I downloaded the Angular Tour of Heroes testing project here. I am getting the following errors right from the start. Any ideas?

ERROR in Entry module not found: Error: Can't resolve 'C:\code\testing\src\test.ts' in 'C:\code\testing'

ERROR in error TS6053: File 'C:/code/testing/src/test.ts' not found. src/app/twain/twain.component.marbles.spec.ts(3,40): error TS2307: Cannot find module 'jasmine-marbles'.

Evan Carroll
  • 78,363
  • 46
  • 261
  • 468
Rod
  • 14,529
  • 31
  • 118
  • 230

1 Answers1

0

I was able to get it working in a few steps.

  1. Open the angular.json file.

    test => options => main

    Change "main": "src/test.ts", to "main": "src/tests.sb.ts",

  2. Open the tsconfig.spec.json file.

    Change this: "files": [ "test.ts", "polyfills.ts" ],
    To this: "files": [ "tests.sb.ts", "polyfills.ts" ],

  3. Run this:

    npm i jasmine-marbles
    
  4. Then run your test.

    npm test
    

Your tests should now be working.

Matt
  • 33,328
  • 25
  • 83
  • 97