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
+32
View File
@@ -0,0 +1,32 @@
import { hasHorizontalOverflow, hasVerticalOverflow, hasOverflow } from './overflow';
describe('overflow', function () {
it('returns false when no overflow is present', function () {
expect(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(hasOverflow(elementWithOverflow)).toEqual(true);
expect(hasHorizontalOverflow(elementWithOverflow)).toEqual(true);
});
it('detects vertical overflow', function () {
var elementWithOverflow = {
clientWidth: 10,
clientHeight: 10,
scrollWidth: 10,
scrollHeight: 20,
};
expect(hasOverflow(elementWithOverflow)).toEqual(true);
expect(hasVerticalOverflow(elementWithOverflow)).toEqual(true);
});
});
//# sourceMappingURL=overflow.test.js.map