File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -4,16 +4,26 @@ import VueCommandQuery from '@/components/VueCommandQuery.vue'
44
55describe ( 'VueCommand.vue' , ( ) => {
66 describe ( 'props' , ( ) => {
7- it ( 'prompt ' , ( ) => {
7+ it ( 'hides the bar ' , ( ) => {
88 const wrapper = mount ( VueCommand , {
99 props : {
10- prompt : 'TEST_PROMPT'
10+ hideBar : true
11+ }
12+ } )
13+
14+ expect ( wrapper . find ( '.vue-command__bar' ) . exists ( ) ) . toBe ( false )
15+ } )
16+ it ( 'renders the given prompt' , ( ) => {
17+ const prompt = 'TEST_PROMPT'
18+ const wrapper = mount ( VueCommand , {
19+ props : {
20+ prompt
1121 }
1222 } )
1323 const query = wrapper . findComponent ( VueCommandQuery )
1424 const span = query . find ( 'span' )
1525
16- expect ( span . text ( ) ) . toMatch ( 'TEST_PROMPT' )
26+ expect ( span . text ( ) ) . toMatch ( prompt )
1727 } )
1828 } )
1929} )
You can’t perform that action at this time.
0 commit comments