@@ -2,28 +2,26 @@ import { bootstrap } from 'aurelia-bootstrapper';
22import { StageComponent } from 'aurelia-testing' ;
33import { PLATFORM } from 'aurelia-framework' ;
44
5- describe ( 'WelcomeComponent ' , ( ) => {
5+ describe ( 'ShowNameComponent ' , ( ) => {
66 let component ;
77
88 beforeEach ( async ( ) => {
99 component = StageComponent
1010 . withResources ( [
11- PLATFORM . moduleName ( '../../src/app/modules/welcome/welcome.vm' ) ,
12- PLATFORM . moduleName ( '../../src/app/resources/converters/date-format.converter' )
11+ PLATFORM . moduleName ( '../../src/app/resources/elements/show-name/show-name.element' ) ,
1312 ] )
14- . inView ( '<welcome-view-model></welcome-view-model>' ) ;
13+ . inView ( '<show-name some-text.bind="firstName"></show-name>' )
14+ . boundTo ( { firstName : 'Bob' } ) ;
1515 await component . create ( bootstrap ) ;
1616 } ) ;
1717
18- if ( jest ) {
19- xit ( 'should render correctly' , ( ) => {
18+ it ( 'should render correctly' , ( ) => {
2019 expect ( document . body . outerHTML ) . toMatchSnapshot ( ) ;
2120 } ) ;
22- }
2321
24- xit ( 'should render first name' , ( ) => {
22+ it ( 'should render first name' , ( ) => {
2523 const nameElement = document . querySelector ( '#fn' ) as HTMLInputElement ;
26- expect ( nameElement . value ) . toBe ( 'John ' ) ;
24+ expect ( nameElement . innerHTML ) . toBe ( 'Bob ' ) ;
2725 } ) ;
2826
2927 afterEach ( ( ) => {
0 commit comments