devextreme
Version:
HTML5 JavaScript Component Suite for Responsive Web Development
39 lines (38 loc) • 1.61 kB
JavaScript
/**
* DevExtreme (cjs/__internal/scheduler/r1/utils/views.test.js)
* Version: 25.1.3
* Build date: Wed Jun 25 2025
*
* Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
;
var _globals = require("@jest/globals");
var _views = require("./views");
(0, _globals.describe)("views utils", (() => {
(0, _globals.describe)("getCurrentView", (() => {
(0, _globals.it)("should return string", (() => {
(0, _globals.expect)((0, _views.getCurrentView)("agenda", ["agenda"])).toBe("agenda")
}));
(0, _globals.it)("should return view by type", (() => {
(0, _globals.expect)((0, _views.getCurrentView)("agenda", ["month", {
type: "agenda"
}])).toEqual({
type: "agenda"
})
}));
(0, _globals.it)("should return view by name", (() => {
(0, _globals.expect)((0, _views.getCurrentView)("agenda", ["month", {
type: "agenda"
}])).toEqual({
type: "agenda"
})
}));
(0, _globals.it)("should return default view if it doesn't set", (() => {
(0, _globals.expect)((0, _views.getCurrentView)("agenda", ["month"])).toBe("agenda")
}));
(0, _globals.it)("should return first view if nothing found", (() => {
(0, _globals.expect)((0, _views.getCurrentView)("agendaShort", ["agendaUnknown"])).toBe("agendaUnknown")
}))
}))
}));