0

Erro ao rodar ng test.

 {
    "message": "An error was thrown in afterAll\nUncaught Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'home'\nError: Cannot match any routes. URL Segment: 'home'\n    at ApplyRedirects.noMatchError (./node_modules/@angular/router/fesm5/router.js?:1455:16)\n    at CatchSubscriber.eval [as selector] (./node_modules/@angular/router/fesm5/router.js?:1436:29)\n    at CatchSubscriber.error (./node_modules/rxjs/_esm5/internal/operators/catchError.js?:40:31)\n    at MapSubscriber.Subscriber._error (./node_modules/rxjs/_esm5/internal/Subscriber.js?:89:26)\n    at MapSubscriber.Subscriber.error (./node_modules/rxjs/_esm5/internal/Subscriber.js?:69:18)\n    at MapSubscriber.Subscriber._error (./node_modules/rxjs/_esm5/internal/Subscriber.js?:89:26)\n    at MapSubscriber.Subscriber.error (./node_modules/rxjs/_esm5/internal/Subscriber.js?:69:18)\n    at MapSubscriber.Subscriber._error (./node_modules/rxjs/_esm5/internal/Subscriber.js?:89:26)\n    at MapSubscriber.Subscriber.error (./node_modules/rxjs/_esm5/internal/Subscriber.js?:69:18)\n    at TapSubscriber._error (./node_modules/rxjs/_esm5/internal/operators/tap.js?:67:26) thrown",
    "str": "An error was thrown in afterAll\nUncaught Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'home'\nError: Cannot match any routes. URL Segment: 'home'\n    at ApplyRedirects.noMatchError (./node_modules/@angular/router/fesm5/router.js?:1455:16)\n    at CatchSubscriber.eval [as selector] (./node_modules/@angular/router/fesm5/router.js?:1436:29)\n    at CatchSubscriber.error (./node_modules/rxjs/_esm5/internal/operators/catchError.js?:40:31)\n    at MapSubscriber.Subscriber._error (./node_modules/rxjs/_esm5/internal/Subscriber.js?:89:26)\n    at MapSubscriber.Subscriber.error (./node_modules/rxjs/_esm5/internal/Subscriber.js?:69:18)\n    at MapSubscriber.Subscriber._error (./node_modules/rxjs/_esm5/internal/Subscriber.js?:89:26)\n    at MapSubscriber.Subscriber.error (./node_modules/rxjs/_esm5/internal/Subscriber.js?:69:18)\n    at MapSubscriber.Subscriber._error (./node_modules/rxjs/_esm5/internal/Subscriber.js?:89:26)\n    at MapSubscriber.Subscriber.error (./node_modules/rxjs/_esm5/internal/Subscriber.js?:69:18)\n    at TapSubscriber._error (./node_modules/rxjs/_esm5/internal/operators/tap.js?:67:26) thrown"
  }

Obs: Erro é intermitente. Quando não dá erro os testes passam todos.

$ node_modules\.bin\ng -v

Angular CLI: 6.2.9
Node: 10.13.0
OS: win32 x64
Angular: 6.1.10
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, route
5
  • Coloca o trecho de codigo que falha no teste e o teste, só com essa mensagem não tem como saber o que está acontecendo. 14/05/2019 às 14:23
  • Estou tentando entender o que dá erro. Como falei é intermitente, e quando não dá essa mensagem de erro, ele está dando SUCCESS nos testes. 14/05/2019 às 14:30
  • Possui algum erro em chamada de rotas em seu html, poste o html que esta acusando este erro 14/05/2019 às 15:02
  • Qual html está acusando erro? Não sei se leu o comentário anterior, mas é intermitente e quando não dá esse erro ele finaliza os testes com SUCCESS. Postei a dúvida justamente por que não entendo o motivo de dar essa mensagem. Não é um erro legível, e as mensagens não ajudam. Se souber de algo agradeço. Se for questão de versão, paciência então, mas queria entender melhor sobre isso. 14/05/2019 às 15:15
  • tenta rodar algo como npm run test home.component ai vc isola os componentes e ve qual ta com problema 14/05/2019 às 17:44

0

Você deve fazer log-in para responder a esta pergunta.

Pesquise outras perguntas com a tag .