Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(): clean cache during installation to prevent errors #5

Open
davinkevin opened this issue Nov 1, 2018 · 0 comments
Open

feat(): clean cache during installation to prevent errors #5

davinkevin opened this issue Nov 1, 2018 · 0 comments

Comments

@davinkevin
Copy link
Owner

Thanks to @shprink we found this error:

 PASS  src/app/app.component.spec.ts
  AppComponent
    ✓ should create the app (95ms)
    ✓ should have as title 'forgerock-ui-sdk' (44ms)
    ✓ should render title in a h1 tag (24ms)

Test Suites: 1 passed, 1 total
Tests:       3 passed, 3 total
Snapshots:   0 total
Time:        3.383s
Ran all test suites.
 FAIL  projects/components/src/lib/components.service.spec.ts
  ● Test suite failed to run

    /Users/julien.renaux/Sites/forgerock-ui-sdk/projects/components/src/lib/components.service.spec.ts:1
    ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){require('ts-jest').install("/Users/julien.renaux/Sites/forgerock-ui-sdk/projects/components/src/lib/components.service.spec.ts", "import { TestBed } from '@angular/core/testing';\nimport { ComponentsService } from './components.service';\ndescribe('ComponentsService', function () {\n    beforeEach(function () { return TestBed.configureTestingModule({}); });\n    it('should be created', function () {\n        var service = TestBed.get(ComponentsService);\n        expect(service).toBeTruthy();\n    });\n});\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tcG9uZW50cy5zZXJ2aWNlLnNwZWMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJjb21wb25lbnRzLnNlcnZpY2Uuc3BlYy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFFaEQsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU

    SyntaxError: Unexpected token {

      at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/script_transformer.js:316:17)

 FAIL  projects/components/src/lib/components.component.spec.ts
  ● Test suite failed to run

    /Users/julien.renaux/Sites/forgerock-ui-sdk/projects/components/src/lib/components.component.spec.ts:1
    ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){require('ts-jest').install("/Users/julien.renaux/Sites/forgerock-ui-sdk/projects/components/src/lib/components.component.spec.ts", "import { async, TestBed } from '@angular/core/testing';\nimport { ComponentsComponent } from './components.component';\ndescribe('ComponentsComponent', function () {\n    var component;\n    var fixture;\n    beforeEach(async(function () {\n        TestBed.configureTestingModule({\n            declarations: [ComponentsComponent]\n        })\n            .compileComponents();\n    }));\n    beforeEach(function () {\n        fixture = TestBed.createComponent(ComponentsComponent);\n        component = fixture.componentInstance;\n        fixture.detectChanges();\n    });\n    it('should create', function () {\n        expect(component).toBeTruthy();\n    });\n});\n//# sourceMappingURL=data:app

    SyntaxError: Unexpected token {

      at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/script_transformer.js:316:17)

Test Suites: 2 failed, 2 total
Tests:       0 total
Snapshots:   0 total
Time:        1.661s
Ran all test suites.
npm ERR! Test failed.  See above for more details.

It seems the command npx jest --clearCache fix this. A jest seems to be made before installing the schematics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant