Когда я запускаю тесты, используя ng test --code-coverage, я получаю покрытие кода как неизвестное, не зная, что может пойти не так. Любая помощь здесь приветствуется.
ng test --code-coverage
> ng test --code-coverage 10% building modules 1/1 modules 0 active26 06 2018 11:00:51.088:WARN [karma]: No captured browser, open http://localhost:9876/ 26 06 2018 11:00:51.095:INFO [karma]: Karma v2.0.0 server started at http://0.0.0.0:9876/ 26 06 2018 11:00:51.095:INFO [launcher]: Launching browser Chrome with unlimited concurrency 26 06 2018 11:00:51.100:INFO [launcher]: Starting browser Chrome 26 06 2018 11:01:48.404:WARN [karma]: No captured browser, open http://localhost:9876/ 26 06 2018 11:01:48.665:INFO [Chrome 67.0.3396 (Mac OS X 10.11.6)]: Connected on socket UhrUQZiU8ZuG8qRwAAAA with id 31579746 Chrome 67.0.3396 (Mac OS X 10.11.6): Executed 1151 of 2149 (skipped 843) SUCCESS (0 secs / 0 secs) 26 06 2018 11:07:31.910:WARN [Chrome 67.0.3396 (Mac OS X 10.11.6)]: Disconnected (1 times), because no message in 10000 ms. Chrome 67.0.3396 (Mac OS X 10.11.6) ERROR Chrome 67.0.3396 (Mac OS X 10.11.6) ERROR Disconnected, because no message in 10000 ms. Chrome 67.0.3396 (Mac OS X 10.11.6): Executed 1151 of 2149 (skipped 843) DISCONNECTED (5 mins 31.686 secs / 0 secs) Chrome 67.0.3396 (Mac OS X 10.11.6) ERROR Chrome 67.0.3396 (Mac OS X 10.11.6): Executed 1151 of 2149 (skipped 843) DISCONNECTED (5 mins 31.686 secs / 0 secs) =============================== Coverage summary =============================== Statements : Unknown% ( 0/0 ) Branches : Unknown% ( 0/0 ) Functions : Unknown% ( 0/0 ) Lines : Unknown% ( 0/0 ) Chrome 67.0.3396 (Mac OS X 10.11.6): Executed 1295 of 2149 (skipped 854) DISCONNECTED (6 mins 49.413 secs / 0 secs)
Перейдите в папку ./coverage в корневом каталоге вашего проекта. Затем вы можете открыть ./coverage/index.html, чтобы просмотреть отчет о покрытии.