first commit

This commit is contained in:
Stefan Hacker
2026-04-03 09:38:48 +02:00
commit 37ad745546
47450 changed files with 3120798 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
"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