File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
apps/example-app-karma/src Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 1+ import { render , screen } from '@testing-library/angular' ;
2+
3+ it ( 'can use jasmine matchers' , async ( ) => {
4+ await render ( `<div>Hello {{ name}}</div>` , {
5+ componentProperties : {
6+ name : 'Sarah' ,
7+ } ,
8+ } ) ;
9+
10+ expect ( screen . getByText ( 'Hello Sarah' ) ) . toBeVisible ( ) ;
11+ } ) ;
Original file line number Diff line number Diff line change 22import 'zone.js/dist/zone-testing' ;
33import { getTestBed } from '@angular/core/testing' ;
44import { BrowserDynamicTestingModule , platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing' ;
5+ import JasmineDOM from '@testing-library/jasmine-dom/dist' ;
6+
7+ beforeAll ( ( ) => {
8+ ( jasmine . getEnv ( ) as any ) . addMatchers ( JasmineDOM ) ;
9+ } ) ;
510
611declare const require : any ;
712
You can’t perform that action at this time.
0 commit comments