1
0

merge upstream for 2024.2.1

This commit is contained in:
dakkar
2024-03-02 16:36:49 +00:00
committed by Amelia Yukii
parent eab7d5bd27
commit af548d05ca
137 changed files with 4524 additions and 2933 deletions
+4 -2
View File
@@ -9,6 +9,7 @@ import { onScrollBottom, onScrollTop } from '@/scripts/scroll.js';
describe('Scroll', () => {
describe('onScrollTop', () => {
/* 動作しない(happy-domのバグ?)
test('Initial onScrollTop callback for connected elements', () => {
const { document } = new Window();
const div = document.createElement('div');
@@ -21,6 +22,7 @@ describe('Scroll', () => {
assert.ok(called);
});
*/
test('No onScrollTop callback for disconnected elements', () => {
const { document } = new Window();
@@ -35,11 +37,11 @@ describe('Scroll', () => {
});
describe('onScrollBottom', () => {
/* 動作しない(happy-domのバグ?)
test('Initial onScrollBottom callback for connected elements', () => {
const { document } = new Window();
const div = document.createElement('div');
assert.strictEqual(div.scrollTop, 0);
(div as any).scrollHeight = 100; // happy-dom has no scrollHeight
document.body.append(div);
@@ -48,12 +50,12 @@ describe('Scroll', () => {
assert.ok(called);
});
*/
test('No onScrollBottom callback for disconnected elements', () => {
const { document } = new Window();
const div = document.createElement('div');
assert.strictEqual(div.scrollTop, 0);
(div as any).scrollHeight = 100; // happy-dom has no scrollHeight
let called = false;
onScrollBottom(div as any as HTMLElement, () => called = true);