I have encountered an issue while trying to test my angular2 application. Every time I import TestComponentBuilder, it throws an error: Error: No provider for DirectiveResolver!
This project is written in TypeScript and uses Angular2 RC2.
Below is the content of my spec (test) file:
import { Component, provide, EventEmitter} from '@angular/core';
import { HTTP_PROVIDERS } from '@angular/http';
import { PreliminaryNotice } from '../models/preliminary-notice-model';
import { IndustryCategoryDynamicLookup } from '../models/industry-category-dynamic-lookup-model';
import { PreliminaryNoticeService } from '../preliminary-notice-service/preliminary-notice.service';
import { ExpandedPreliminaryNotice } from './expanded-preliminary-notice';
... // Code continues here
Here is the related component code:
import { Component, Injectable, Inject, EventEmitter, OnInit, Output } from '@angular/core';
import { NgClass } from '@angular/common';
import { PreliminaryNotice } from '../models/preliminary-notice-model';
import { IndustryCategoryDynamicLookup } from '../models/industry-category-dynamic-lookup-model';
import { PreliminaryNoticeService } from '../preliminary-notice-service/preliminary-notice.service';
... // Code continues here
And the template HTML for the component:
<div [ngStyle]="getCssClass()" id="expandablePreliminaryNotice_{{preliminaryNotice.id}}">
... // Template code continues here
I attempted to add an import for the DirectiveResolver but it led to a chain of manual additions that seems incorrect. If there are any corrections or missing details, please let me know. Thank you.