devextreme
Version:
JavaScript/TypeScript Component Suite for Responsive Web Development
91 lines (90 loc) • 2.33 kB
JavaScript
/**
* DevExtreme (esm/__internal/scheduler/view_model/generate_view_model/steps/add_emptiness.test.js)
* Version: 25.2.8
* Build date: Mon Jun 08 2026
*
* Copyright (c) 2012 - 2026 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
import {
describe,
expect,
it
} from "@jest/globals";
import {
addEmptiness
} from "./add_emptiness";
describe("addEmptiness", () => {
it("should return set empty for timeline view", () => {
expect(addEmptiness([{
height: 34,
width: 41
}, {
height: 36,
width: 41
}], {
isTimelineView: true,
isAdaptivityEnabled: false,
isMonthView: false
})).toEqual([{
height: 34,
width: 41,
empty: true
}, {
height: 36,
width: 41,
empty: false
}])
});
it("should return set empty for general view", () => {
expect(addEmptiness([{
height: 34,
width: 39
}, {
height: 36,
width: 41
}, {
height: 20,
width: 20,
isAllDayPanelOccupied: true
}], {
isTimelineView: false,
isAdaptivityEnabled: false,
isMonthView: false
})).toEqual([{
height: 34,
width: 39,
empty: true
}, {
height: 36,
width: 41,
empty: false
}, {
height: 20,
width: 20,
isAllDayPanelOccupied: true,
empty: false
}])
});
it("should return set empty for adaptivity view", () => {
expect(addEmptiness([{
height: 25,
width: 40
}, {
height: 30,
width: 40
}], {
isTimelineView: false,
isAdaptivityEnabled: true,
isMonthView: false
})).toEqual([{
height: 25,
width: 40,
empty: true
}, {
height: 30,
width: 40,
empty: false
}])
})
});