Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Tests in client fails #17

Description

@sbglasius

Environment:
Grails 3.3.8
Ubuntu 18.04
Java version "1.8.0_181"

How to reproduce:

grails create-app testme --profile angular
cd testme
./gradlew client:test

Result:

$ ng test --watch=false
04 09 2018 08:59:01.116:INFO [karma]: Karma v2.0.0 server started at http://0.0.0.0:9876/
04 09 2018 08:59:01.118:INFO [launcher]: Launching browser Chrome with unlimited concurrency
04 09 2018 08:59:01.122:INFO [launcher]: Starting browser Chrome
04 09 2018 08:59:07.606:INFO [Chrome 62.0.3202 (Linux 0.0.0)]: Connected on socket i3ALHg9ei2h5PIkBAAAA with id 91016565
Chrome 62.0.3202 (Linux 0.0.0) Service: Nav getNavData() should get application data and cache it FAILED
          StaticInjectorError(Platform: core)[NavService -> HttpClient]: 
            NullInjectorError: No provider for HttpClient!
        Error: StaticInjectorError(DynamicTestModule)[NavService -> HttpClient]: 
            at _NullInjector.webpackJsonp../node_modules/@angular/core/esm5/core.js._NullInjector.get node_modules/@angular/core/esm5/core.js:1002:1)
            at resolveToken node_modules/@angular/core/esm5/core.js:1300:1)
            at tryResolveToken node_modules/@angular/core/esm5/core.js:1242:1)
            at StaticInjector.webpackJsonp../node_modules/@angular/core/esm5/core.js.StaticInjector.get node_modules/@angular/core/esm5/core.js:1110:1)
            at resolveToken node_modules/@angular/core/esm5/core.js:1300:1)
            at tryResolveToken node_modules/@angular/core/esm5/core.js:1242:1)
            at StaticInjector.webpackJsonp../node_modules/@angular/core/esm5/core.js.StaticInjector.get node_modules/@angular/core/esm5/core.js:1110:1)
            at resolveNgModuleDep node_modules/@angular/core/esm5/core.js:10854:1)
            at _createClass node_modules/@angular/core/esm5/core.js:10891:1)
            at _createProviderInstance$1 node_modules/@angular/core/esm5/core.js:10865:1)
Chrome 62.0.3202 (Linux 0.0.0): Executed 6 of 6 (1 FAILED) (0 secs / 0.593 secs)
Chrome 62.0.3202 (Linux 0.0.0) Service: Nav getNavData() should get application data and cache it FAILED
          StaticInjectorError(Platform: core)[NavService -> HttpClient]: 
            NullInjectorError: No provider for HttpClient!
        Error: StaticInjectorError(DynamicTestModule)[NavService -> HttpClient]: 
            at _NullInjector.webpackJsonp../node_modules/@angular/core/esm5/core.js._NullInjector.get node_modules/@angular/core/esm5/core.js:1002:1)
            at resolveToken node_modules/@angular/core/esm5/core.js:1300:1)
            at tryResolveToken node_modules/@angular/core/esm5/core.js:1242:1)
            at StaticInjector.webpackJsonp../node_modules/@angular/core/esm5/core.js.StaticInjector.get node_modules/@angular/core/esm5/core.js:1110:1)
            at resolveToken node_modules/@angular/core/esm5/core.js:1300:1)
            at tryResolveToken node_modules/@angular/core/esm5/core.js:1242:1)
            at StaticInjector.webpackJsonp../node_modules/@angular/core/esm5/core.js.StaticInjector.get node_modules/@angular/core/esm5/core.js:1110:1)
            at resolveNgModuleDep node_modules/@angular/core/esm5/core.js:10854:1)
            at _createClass node_modules/@angular/core/esm5/core.js:10891:1)
Chrome 62.0.3202 (Linux 0.0.0): Executed 6 of 6 (1 FAILED) (0.614 secs / 0.593 secs)
error An unexpected error occurred: "Command failed.

The testing framework fails when testing nav.service.ts

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions