Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

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

Closed
jimmymain opened this issue Feb 28, 2018 · 8 comments
Closed

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

jimmymain opened this issue Feb 28, 2018 · 8 comments

Comments

@jimmymain
Copy link

jimmymain commented Feb 28, 2018

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
Copy link
Collaborator

@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 #1015 (comment) to find a temp solution.

@JiaLiPassion
Copy link
Collaborator

JiaLiPassion commented Feb 28, 2018 via email

@jimmykane
Copy link

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
Copy link
Collaborator

@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
Copy link

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
Copy link
Collaborator

@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
Copy link

@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
Copy link
Collaborator

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

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

No branches or pull requests

3 participants