devextreme
Version:
JavaScript/TypeScript Component Suite for Responsive Web Development
34 lines (33 loc) • 1.38 kB
JavaScript
/**
* DevExtreme (cjs/__internal/core/license/license_validation.server.test.js)
* Version: 25.2.7
* Build date: Tue May 05 2026
*
* Copyright (c) 2012 - 2026 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
;
var _globals = require("@jest/globals");
var _license_validation = require("./license_validation");
(0, _globals.describe)("license token", () => {
(0, _globals.beforeEach)(() => {
(0, _license_validation.setLicenseCheckSkipCondition)(false)
});
(0, _globals.afterEach)(() => {
_globals.jest.restoreAllMocks()
});
(0, _globals.test)("API inside trial_panel should not be triggered on the server", () => {
(0, _globals.expect)(() => (0, _license_validation.validateLicense)("", "1.0.4")).not.toThrow()
});
(0, _globals.test)("API inside trial_panel should not be triggered in Angular, where HTMLElement is mocked", () => {
if (global.HTMLElement) {
throw Error("Wrong environment for this test!")
}
try {
global.HTMLElement = Symbol("HTMLElement mock");
(0, _globals.expect)(() => (0, _license_validation.validateLicense)("", "1.0.4")).not.toThrow()
} finally {
delete global.HTMLElement
}
})
});