/
DatepickerTable.spec.js
31 lines (28 loc) · 1.02 KB
/
DatepickerTable.spec.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { shallowMount } from '@vue/test-utils'
import BDatepickerTable from '@components/datepicker/DatepickerTable'
import config, {setOptions} from '@utils/config'
describe('BDatepickerTable', () => {
beforeEach(() => {
setOptions(Object.assign(config, {
defaultMonthNames: [
'January', 'February', 'March', 'April', 'May', 'June', 'July',
'August', 'September', 'October', 'November', 'December'
],
defaultDayNames: ['Su', 'M', 'Tu', 'W', 'Th', 'F', 'S']
}))
})
it('is called', () => {
const wrapper = shallowMount(BDatepickerTable, {
propsData: {
dayNames: config.defaultMonthNames,
monthNames: config.defaultMonthNames,
focused: {
month: new Date(),
year: new Date()
}
}
})
expect(wrapper.name()).toBe('BDatepickerTable')
expect(wrapper.isVueInstance()).toBeTruthy()
})
})