2016-12-06 7 views
1

VMwareのClarityコンポーネントを使用するAngular 2プロジェクトでPOCを実行しています。私はテストランナーを実行すると、私は次のエラーを取得しています:VMware Clarityモジュールを使用した角度2ユニットテスト

'clr-main-container' is not a known element: 
1. If 'clr-main-container' is an Angular component, then verify that it is part of this module. 
2. If 'clr-main-container' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schemas' of this component to suppress this message. ("[ERROR ->]<clr-main-container> 

私は、角2に新たなんだと私はGoogleで何かを見つけることができませんよ。

+0

こんにちは@agillette。 'ClarityModule'を登録していないようです。完全な問題を理解するための詳細が必要です。テストランナーは何ですか? Clarity seedプロジェクトを使用していますか? Clarityの開始ページ(https://vmware.github.io/clarity/get-started#seedProjectClarity)に進み、シードアプリを使用することをおすすめします。 – takeradi

答えて

2

こんにちはagillette テストでテストベッド構成が不足している可能性があります。ような何か:

import {async, ComponentFixture, TestBed} from "@angular/core/testing"; 
 
import {ClarityModule} from 'clarity-angular'; 
 

 
describe('...', function() { 
 

 
    beforeEach(() => { 
 
    TestBed.configureTestingModule({ 
 
     imports: [ClarityModule.forRoot()], 
 
     declarations: [YourTestComponent] 
 
    }); 
 
    }); 
 

 
});
あなたはテストベッド hereについての詳細を読むことができます。

またに配線テストと簡単な作業アプリケーションのClarity seedをチェックアウトして自由に感じる。

関連する問題