2
0
mirror of https://github.com/tenrok/vue2-datepicker.git synced 2026-06-21 08:00:36 +03:00

test: fix snapshot inconsistency due to time zone

This commit is contained in:
mengxiong10
2019-11-11 11:16:09 +08:00
parent e2b24fa833
commit 0ff10e170a
6 changed files with 209 additions and 198 deletions
+4 -4
View File
@@ -11,7 +11,7 @@ describe('TimePanel', () => {
it('render: correct classes of the columns', () => {
wrapper = mount(TimePanel, {
propsData: {
value: new Date(Date.UTC(2019, 9, 4, 12, 30, 30)),
value: new Date(2019, 9, 4, 12, 30, 30),
disabledTime: date => date.getHours() < 10,
},
});
@@ -21,7 +21,7 @@ describe('TimePanel', () => {
it('render: correct columns by format', () => {
wrapper = mount(TimePanel, {
propsData: {
value: new Date(Date.UTC(2019, 9, 4)),
value: new Date(2019, 9, 4),
format: 'hh:mm a',
minuteStep: 30,
hourOptions: Array.from({ length: 10 }).map((_, i) => i + 8),
@@ -33,7 +33,7 @@ describe('TimePanel', () => {
it('render: correct classes of the fixed time list', () => {
wrapper = mount(TimePanel, {
propsData: {
value: new Date(Date.UTC(2019, 10, 9, 12, 30)),
value: new Date(2019, 10, 9, 12, 30),
disabledTime: date => date.getHours() < 10,
timePickerOptions: {
start: '08:30',
@@ -49,7 +49,7 @@ describe('TimePanel', () => {
it('render: correct 12hours in the fixed time list', () => {
wrapper = mount(TimePanel, {
propsData: {
value: new Date(Date.UTC(2019, 10, 9, 12, 30)),
value: new Date(2019, 10, 9, 12, 30),
timePickerOptions: {
start: '08:30',
step: '00:30',