Outlook_Addin_LLM/node_modules/@fluentui/utilities/lib-commonjs/overflow.test.js

34 lines
1.2 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var overflow_1 = require("./overflow");
describe('overflow', function () {
it('returns false when no overflow is present', function () {
expect((0, overflow_1.hasOverflow)({
clientWidth: 10,
clientHeight: 10,
scrollWidth: 10,
scrollHeight: 10,
})).toEqual(false);
});
it('detects horizontal overflow', function () {
var elementWithOverflow = {
clientWidth: 10,
clientHeight: 10,
scrollWidth: 20,
scrollHeight: 10,
};
expect((0, overflow_1.hasOverflow)(elementWithOverflow)).toEqual(true);
expect((0, overflow_1.hasHorizontalOverflow)(elementWithOverflow)).toEqual(true);
});
it('detects vertical overflow', function () {
var elementWithOverflow = {
clientWidth: 10,
clientHeight: 10,
scrollWidth: 10,
scrollHeight: 20,
};
expect((0, overflow_1.hasOverflow)(elementWithOverflow)).toEqual(true);
expect((0, overflow_1.hasVerticalOverflow)(elementWithOverflow)).toEqual(true);
});
});
//# sourceMappingURL=overflow.test.js.map