File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change 1+ import  {  mount  }  from  '@vue/test-utils' ; 
2+ import  {  Comment  }  from  '..' ; 
3+ 
14describe ( 'comment test' ,  ( )  =>  { 
2-  it . todo ( 'comment init render' ) ; 
5+  it ( 'comment init render' ,  async  ( )  =>  { 
6+  const  wrapper  =  mount ( Comment ,  { 
7+  slots : { 
8+  actions : 'Comment Actions' , 
9+  author : 'Comment Author' , 
10+  avatar : 'Comment Avatar' , 
11+  content : 'Comment Content' , 
12+  datetime : 'Comment Datetime' , 
13+  } , 
14+  } ) ; 
15+  expect ( wrapper . find ( '.devui-comment' ) . exists ( ) ) . toBe ( true ) ; 
16+  expect ( wrapper . find ( '.devui-comment-actions' ) . text ( ) ) . toBe ( 'Comment Actions' ) ; 
17+  expect ( wrapper . find ( '.devui-comment-author' ) . text ( ) ) . toBe ( 'Comment Author' ) ; 
18+  expect ( wrapper . find ( '.devui-comment-avatar' ) . text ( ) ) . toBe ( 'Comment Avatar' ) ; 
19+  expect ( wrapper . find ( '.devui-comment-content' ) . text ( ) ) . toBe ( 'Comment Content' ) ; 
20+  expect ( wrapper . find ( '.devui-comment-datetime' ) . text ( ) ) . toBe ( 'Comment Datetime' ) ; 
21+  } ) ; 
322} ) ; 
                         You can’t perform that action at this time. 
           
                  
0 commit comments