Skip to content

Commit 99adcbc

Browse files
committed
test: hide bar
1 parent 4f829b8 commit 99adcbc

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

tests/unit/vue-command.spec.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,26 @@ import VueCommandQuery from '@/components/VueCommandQuery.vue'
44

55
describe('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
})

0 commit comments

Comments
 (0)