angular / zone.js

Implements Zones for JavaScript
https://github.com/angular/angular/tree/master/packages/zone.js/
MIT License
3.25k stars 408 forks source link

testProxyZone is null in simple angular 5 / karma test run #1035

Closed jimmymain closed 5 years ago

jimmymain commented 6 years ago

I have logged a question for this, but I think it's possibly a bug.

testProxyZone is null in the function below. TypeError: Cannot read property 'run' of null all the packages are updated to the latest release version

function wrapTestInZone(testBody) {
        // The `done` callback is only passed through if the function expects at least one argument.
        // Note we have to make a function with correct number of arguments, otherwise jasmine will
        // think that all functions are sync or async.
        return testBody && (testBody.length ? function (done) {
            return testProxyZone.run(testBody, this, [done]);
        } : function () {
            return testProxyZone.run(testBody, this); // <= this is null.
        });
    }

The testProxyZone is null even though my base.spec.js contains the necessary imports.

import "core-js"
import "zone.js/dist/zone";
import "zone.js/dist/long-stack-trace-zone";
import "zone.js/dist/proxy";
import "zone.js/dist/sync-test";
import "zone.js/dist/jasmine-patch";
import "zone.js/dist/async-test";
import "zone.js/dist/fake-async-test";

import { TestBed } from "@angular/core/testing";
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from "@angular/platform-browser-dynamic/testing";

TestBed.initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());

the test contains the necessary import / setup

import { TestBed } from "@angular/core/testing";

describe("karma sanity check",
    () => {
        beforeEach(() =>
        {
            TestBed.configureTestingModule({ providers: [] });
        });

        it("1+1=2", () => expect(1 + 1).toBe(2));
    });

and the configuration references the necessary libraries?

module.exports = function (config) {
  config.set({
    basePath: '',
    frameworks: ['jasmine', 'karma-typescript'],
    plugins: [
      require('karma-jasmine'),
      require('karma-typescript'),
      require('karma-chrome-launcher'),
      require('karma-jasmine-html-reporter')
    ],
    files: [
      { pattern: 'base.spec.ts'},
      { pattern: 'wwwroot/ts/**/*.spec.ts' }
    ],
    preprocessors: {
      "**/*.ts": ["karma-typescript"]
    },
    mime: {
      'text/x-typescript': ['ts', 'tsx']
    },
    coverageIstanbulReporter: {
      reports: ['html', 'lcovonly'],
      fixWebpackSourcePaths: true
    },   
    karmaTypescriptConfig: {
      tsconfig: "./tsconfig.json"
    },
    port: 9876,
    colors: true,
    logLevel: config.LOG_INFO,
    autoWatch: true,
    browsers: ['Chrome'],
    singleRun: false
  });
};
JiaLiPassion commented 6 years ago

@jimmymain, if you are using jasmine 3.x, it is duplicate with #1015. It have been fixed and will be released in next version. you can see https://github.com/angular/zone.js/issues/1015#issuecomment-368939131 to find a temp solution.

JiaLiPassion commented 6 years ago

Could you provide a reproduce repo?

On Wed, Feb 28, 2018 at 2:53 PM, Jim notifications@github.com wrote:

I am using jasmine 2.0.0, the latest release version

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/angular/zone.js/issues/1035#issuecomment-369130533, or mute the thread https://github.com/notifications/unsubscribe-auth/ABYDD9O5Ly4extXcIrlvfqe5jOltGaj7ks5tZOn3gaJpZM4SWGuy .

jimmykane commented 6 years ago

I don't know if it's related to zone but here is a repo

https://github.com/jimmykane/quantified-self

Mine same problem

JiaLiPassion commented 6 years ago

@jimmymain , you could try to update your package.json to

"zone.js": "git://github.com/JiaLiPassion/zone.js#jasmine-dist"

and run npm install and try again.

jimmykane commented 6 years ago

Hey @JiaLiPassion thanks for the reply. That seems to fix the problem, however I get some errors again when running the tests.

But keep in mind I am just gettting started with angular testing so it might be my mistake.

I am pasting the output here just in case it is usefull

16 03 2018 11:47:56.651:INFO [Chrome 65.0.3325 (Mac OS X 10.13.3)]: Connected on socket wkwuI_oI-_UswkDKAAAA with id 4136108
Chrome 65.0.3325 (Mac OS X 10.13.3): Executed 0 of 2 SUCCESS (0 secs / 0 secs)
Chrome 65.0.3325 (Mac OS X 10.13.3) AppComponent should create the app FAILED
    1. If 'app-sidenav' is an Angular component, then verify that it is part of this module.
    2. If 'app-sidenav' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("
      <mat-sidenav #sidenav mode="push">
        [ERROR ->]<app-sidenav></app-sidenav>
      </mat-sidenav>
    1. If 'mat-sidenav' is an Angular component, then verify that it is part of this module.
    2. If 'mat-sidenav' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("<mat-sidenav-container class="mat-typography">
      [ERROR ->]<mat-sidenav #sidenav mode="push">
        <app-sidenav></app-sidenav>
      </mat-sidenav>
    error properties: Object({ ngSyntaxError: true, ngParseErrors: [ 'app-sidenav' is not a known element:
    "): ng:///DynamicTestModule/AppComponent.html@3:4, 'mat-sidenav' is not a known element:
    "): ng:///DynamicTestModule/AppComponent.html@2:2, 'mat-icon' is not a known element:
    1. If 'mat-icon' is an  ...
    Error: Template parse errors:
        at <Jasmine>
        at syntaxError node_modules/@angular/compiler/esm5/compiler.js:485:22)
        at TemplateParser.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.TemplateParser.parse node_modules/@angular/compiler/esm5/compiler.js:24668:1)
        at JitCompiler.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler._parseTemplate node_modules/@angular/compiler/esm5/compiler.js:34621:1)
        at JitCompiler.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler._compileTemplate node_modules/@angular/compiler/esm5/compiler.js:34596:1)
        at http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/compiler/esm5/compiler.js:34497:48
        at <Jasmine>
        at JitCompiler.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler._compileComponents node_modules/@angular/compiler/esm5/compiler.js:34497:1)
        at http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/compiler/esm5/compiler.js:34385:1
        at Object.then node_modules/@angular/compiler/esm5/compiler.js:474:33)
        at JitCompiler.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler._compileModuleAndAllComponents node_modules/@angular/compiler/esm5/compiler.js:34383:1)
    1. If 'app-sidenav' is an Angular component, then verify that it is part of this module.
    2. If 'app-sidenav' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("
      <mat-sidenav #sidenav mode="push">
        [ERROR ->]<app-sidenav></app-sidenav>
      </mat-sidenav>
    1. If 'mat-sidenav' is an Angular component, then verify that it is part of this module.
    2. If 'mat-sidenav' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("<mat-sidenav-container class="mat-typography">
      [ERROR ->]<mat-sidenav #sidenav mode="push">
        <app-sidenav></app-sidenav>
      </mat-sidenav>
    error properties: Object({ ngSyntaxError: true, ngParseErrors: [ 'app-sidenav' is not a known element:
    "): ng:///DynamicTestModule/AppComponent.html@3:4, 'mat-sidenav' is not a known element:
    "): ng:///DynamicTestModule/AppComponent.html@2:2, 'mat-icon' is not a known element:
    1. If 'mat-icon' is an  ...
    Error: Template parse errors:
        at <Jasmine>
        at syntaxError node_modules/@angular/compiler/esm5/compiler.js:485:22)
        at TemplateParser.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.TemplateParser.parse node_modules/@angular/compiler/esm5/compiler.js:24668:1)
        at JitCompiler.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler._parseTemplate node_modules/@angular/compiler/esm5/compiler.js:34621:1)
        at JitCompiler.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler._compileTemplate node_modules/@angular/compiler/esm5/compiler.js:34596:1)
        at http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/compiler/esm5/compiler.js:34497:48
        at <Jasmine>
        at JitCompiler.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler._compileComponents node_modules/@angular/compiler/esm5/compiler.js:34497:1)
        at http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/compiler/esm5/compiler.js:34385:1
        at Object.then node_modules/@angular/compiler/esm5/compiler.js:474:33)
        at JitCompiler.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler._compileModuleAndAllComponents node_modules/@angular/compiler/esm5/compiler.js:34383:1)
Chrome 65.0.3325 (Mac OS X 10.13.3): Executed 1 of 2 (1 FAILED) (0 secs / 0 secs)
Chrome 65.0.3325 (Mac OS X 10.13.3) AppComponent should create the app FAILED
    1. If 'app-sidenav' is an Angular component, then verify that it is part of this module.
    2. If 'app-sidenav' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("
      <mat-sidenav #sidenav mode="push">
        [ERROR ->]<app-sidenav></app-sidenav>
      </mat-sidenav>
    1. If 'mat-sidenav' is an Angular component, then verify that it is part of this module.
    2. If 'mat-sidenav' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("<mat-sidenav-container class="mat-typography">
      [ERROR ->]<mat-sidenav #sidenav mode="push">
        <app-sidenav></app-sidenav>
      </mat-sidenav>
    error properties: Object({ ngSyntaxError: true, ngParseErrors: [ 'app-sidenav' is not a known element:
    "): ng:///DynamicTestModule/AppComponent.html@3:4, 'mat-sidenav' is not a known element:
    "): ng:///DynamicTestModule/AppComponent.html@2:2, 'mat-icon' is not a known element:
    1. If 'mat-icon' is an  ...
    Error: Template parse errors:
        at <Jasmine>
        at syntaxError node_modules/@angular/compiler/esm5/compiler.js:485:22)
        at TemplateParser.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.TemplateParser.parse node_modules/@angular/compiler/esm5/compiler.js:24668:1)
        at JitCompiler.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler._parseTemplate node_modules/@angular/compiler/esm5/compiler.js:34621:1)
        at JitCompiler.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler._compileTemplate node_modules/@angular/compiler/esm5/compiler.js:34596:1)
        at http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/compiler/esm5/compiler.js:34497:48
        at <Jasmine>
        at JitCompiler.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler._compileComponents node_modules/@angular/compiler/esm5/compiler.js:34497:1)
        at http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/compiler/esm5/compiler.js:34385:1
        at Object.then node_modules/@angular/compiler/esm5/compiler.js:474:33)
        at JitCompiler.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler._compileModuleAndAllComponents node_modules/@angular/compiler/esm5/compiler.js:34383:1)
    1. If 'app-sidenav' is an Angular component, then verify that it is part of this module.
    2. If 'app-sidenav' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("
      <mat-sidenav #sidenav mode="push">
        [ERROR ->]<app-sidenav></app-sidenav>
      </mat-sidenav>
    1. If 'mat-sidenav' is an Angular component, then verify that it is part of this module.
    2. If 'mat-sidenav' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("<mat-sidenav-container class="mat-typography">
      [ERROR ->]<mat-sidenav #sidenav mode="push">
        <app-sidenav></app-sidenav>
      </mat-sidenav>
    error properties: Object({ ngSyntaxError: true, ngParseErrors: [ 'app-sidenav' is not a known element:
    "): ng:///DynamicTestModule/AppComponent.html@3:4, 'mat-sidenav' is not a known element:
    "): ng:///DynamicTestModule/AppComponent.html@2:2, 'mat-icon' is not a known element:
    1. If 'mat-icon' is an  ...
    Error: Template parse errors:
        at <Jasmine>
        at syntaxError node_modules/@angular/compiler/esm5/compiler.js:485:22)
        at TemplateParser.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.TemplateParser.parse node_modules/@angular/compiler/esm5/compiler.js:24668:1)
        at JitCompiler.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler._parseTemplate node_modules/@angular/compiler/esm5/compiler.js:34621:1)
        at JitCompiler.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler._compileTemplate node_modules/@angular/compiler/esm5/compiler.js:34596:1)
        at http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/compiler/esm5/compiler.js:34497:48
        at <Jasmine>
        at JitCompiler.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler._compileComponents node_modules/@angular/compiler/esm5/compiler.js:34497:1)
        at http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/compiler/esm5/compiler.js:34385:1
        at Object.then node_modules/@angular/compiler/esm5/compiler.js:474:33)
        at JitCompiler.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler._compileModuleAndAllComponents node_modules/@angular/compiler/esm5/compiler.js:34383:1)
Chrome 65.0.3325 (Mac OS X 10.13.3) UploadInfoComponent should create FAILED
    1. If 'mat-progress-bar' is an Angular component, then verify that it is part of this module.
    2. If 'mat-progress-bar' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("
        </li>
      </ul>
      [ERROR ->]<mat-progress-bar mode="indeterminate"></mat-progress-bar>
    error properties: Object({ ngSyntaxError: true, ngParseErrors: [ 'mat-progress-bar' is not a known element:
    </div>"): ng:///DynamicTestModule/UploadInfoComponent.html@11:2 ] })
    Error: Template parse errors:
        at <Jasmine>
        at syntaxError node_modules/@angular/compiler/esm5/compiler.js:485:22)
        at TemplateParser.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.TemplateParser.parse node_modules/@angular/compiler/esm5/compiler.js:24668:1)
        at JitCompiler.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler._parseTemplate node_modules/@angular/compiler/esm5/compiler.js:34621:1)
        at JitCompiler.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler._compileTemplate node_modules/@angular/compiler/esm5/compiler.js:34596:1)
        at http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/compiler/esm5/compiler.js:34497:48
        at <Jasmine>
        at JitCompiler.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler._compileComponents node_modules/@angular/compiler/esm5/compiler.js:34497:1)
        at http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/compiler/esm5/compiler.js:34385:1
        at Object.then node_modules/@angular/compiler/esm5/compiler.js:474:33)
        at JitCompiler.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler._compileModuleAndAllComponents node_modules/@angular/compiler/esm5/compiler.js:34383:1)
    1. If 'mat-progress-bar' is an Angular component, then verify that it is part of this module.
    2. If 'mat-progress-bar' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("
        </li>
      </ul>
      [ERROR ->]<mat-progress-bar mode="indeterminate"></mat-progress-bar>
    Error: Template parse errors:
    error properties: Object({ ngSyntaxError: true, ngParseErrors: [ 'mat-progress-bar' is not a known element:
    </div>"): ng:///DynamicTestModule/UploadInfoComponent.html@11:2 ] })
        at <Jasmine>
        at syntaxError node_modules/@angular/compiler/esm5/compiler.js:485:22)
        at TemplateParser.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.TemplateParser.parse node_modules/@angular/compiler/esm5/compiler.js:24668:1)
        at JitCompiler.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler._parseTemplate node_modules/@angular/compiler/esm5/compiler.js:34621:1)
        at JitCompiler.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler._compileTemplate node_modules/@angular/compiler/esm5/compiler.js:34596:1)
        at http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/compiler/esm5/compiler.js:34497:48
        at <Jasmine>
        at JitCompiler.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler._compileComponents node_modules/@angular/compiler/esm5/compiler.js:34497:1)
        at http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/compiler/esm5/compiler.js:34385:1
        at Object.then node_modules/@angular/compiler/esm5/compiler.js:474:33)
        at JitCompiler.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler._compileModuleAndAllComponents node_modules/@angular/compiler/esm5/compiler.js:34383:1)
    Expected undefined to be truthy.
        at <Jasmine>
        at UserContext.<anonymous> src/app/components/upload-info/upload-info.component.spec.ts:23:23)
        at ZoneDelegate.webpackJsonp../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke node_modules/zone.js/dist/zone.js:388:1)
        at ProxyZoneSpec.webpackJsonp../node_modules/zone.js/dist/proxy.js.ProxyZoneSpec.onInvoke node_modules/zone.js/dist/proxy.js:79:1)
        at ZoneDelegate.webpackJsonp../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke node_modules/zone.js/dist/zone.js:387:1)
Chrome 65.0.3325 (Mac OS X 10.13.3): Executed 2 of 2 (2 FAILED) (0 secs / 0 secs)
Chrome 65.0.3325 (Mac OS X 10.13.3) UploadInfoComponent should create FAILED
    1. If 'mat-progress-bar' is an Angular component, then verify that it is part of this module.
    2. If 'mat-progress-bar' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("
        </li>
      </ul>
      [ERROR ->]<mat-progress-bar mode="indeterminate"></mat-progress-bar>
    error properties: Object({ ngSyntaxError: true, ngParseErrors: [ 'mat-progress-bar' is not a known element:
    </div>"): ng:///DynamicTestModule/UploadInfoComponent.html@11:2 ] })
    Error: Template parse errors:
        at <Jasmine>
        at syntaxError node_modules/@angular/compiler/esm5/compiler.js:485:22)
        at TemplateParser.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.TemplateParser.parse node_modules/@angular/compiler/esm5/compiler.js:24668:1)
        at JitCompiler.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler._parseTemplate node_modules/@angular/compiler/esm5/compiler.js:34621:1)
        at JitCompiler.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler._compileTemplate node_modules/@angular/compiler/esm5/compiler.js:34596:1)
        at http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/compiler/esm5/compiler.js:34497:48
        at <Jasmine>
        at JitCompiler.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler._compileComponents node_modules/@angular/compiler/esm5/compiler.js:34497:1)
        at http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/compiler/esm5/compiler.js:34385:1
        at Object.then node_modules/@angular/compiler/esm5/compiler.js:474:33)
        at JitCompiler.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler._compileModuleAndAllComponents node_modules/@angular/compiler/esm5/compiler.js:34383:1)
    1. If 'mat-progress-bar' is an Angular component, then verify that it is part of this module.
    2. If 'mat-progress-bar' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("
        </li>
      </ul>
      [ERROR ->]<mat-progress-bar mode="indeterminate"></mat-progress-bar>
    Error: Template parse errors:
    error properties: Object({ ngSyntaxError: true, ngParseErrors: [ 'mat-progress-bar' is not a known element:
    </div>"): ng:///DynamicTestModule/UploadInfoComponent.html@11:2 ] })
        at <Jasmine>
        at syntaxError node_modules/@angular/compiler/esm5/compiler.js:485:22)
        at TemplateParser.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.TemplateParser.parse node_modules/@angular/compiler/esm5/compiler.js:24668:1)
        at JitCompiler.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler._parseTemplate node_modules/@angular/compiler/esm5/compiler.js:34621:1)
        at JitCompiler.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler._compileTemplate node_modules/@angular/compiler/esm5/compiler.js:34596:1)
        at http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/compiler/esm5/compiler.js:34497:48
        at <Jasmine>
        at JitCompiler.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler._compileComponents node_modules/@angular/compiler/esm5/compiler.js:34497:1)
        at http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/compiler/esm5/compiler.js:34385:1
        at Object.then node_modules/@angular/compiler/esm5/compiler.js:474:33)
        at JitCompiler.webpackJsonp../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler._compileModuleAndAllComponents node_modules/@angular/compiler/esm5/compiler.js:34383:1)
    Expected undefined to be truthy.
        at <Jasmine>
        at UserContext.<anonymous> src/app/components/upload-info/upload-info.component.spec.ts:23:23)
        at ZoneDelegate.webpackJsonp../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke node_modules/zone.js/dist/zone.js:388:1)
        at ProxyZoneSpec.webpackJsonp../node_modules/zone.js/dist/proxy.js.ProxyZoneSpec.onInvoke node_modules/zone.js/dist/proxy.js:79:1)
        at ZoneDelegate.webpackJsonp../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke node_modules/zone.js/dist/zone.js:387:1)
Chrome 65.0.3325 (Mac OS X 10.13.3): Executed 2 of 2 (2 FAILED) ERROR (0.144 secs / 0 secs)
JiaLiPassion commented 6 years ago

@jimmykane , the error you posted is not zone.js issue, it seems you didn't compile or load your component correctly, you can ask it at stackoverflow.

jimmykane commented 6 years ago

@JiaLiPassion as I imagined. Told you I am new to this. However indeed your suggestion fixed my first issue.

Should I keep that entry in my package json or how should I proceed with the issue releated to zone.js?

Thank you by the way for the effort!

JiaLiPassion commented 6 years ago

@jimmykane , you can keep the entry if you want to use jasmine 3.x or you can downgrade your jasmine to 2.x.