Initial commit - Todo app frontend

This commit is contained in:
2026-01-28 16:46:44 +00:00
commit 95b816a2e6
15978 changed files with 2514406 additions and 0 deletions

51
node_modules/date-fns/_lib/test.js generated vendored Normal file
View File

@@ -0,0 +1,51 @@
import { afterEach, beforeEach } from "./test/vitest";
import { addLeadingZeros } from "./addLeadingZeros.js";
import { setDefaultOptions } from "./defaultOptions.js";
import sinon from "./test/sinon";
export function assertType(_value) {}
export function resetDefaultOptions() {
setDefaultOptions({});
}
// This makes sure we create the consistent offsets across timezones, no matter where these tests are ran.
export function generateOffset(originalDate) {
// Add the timezone.
let offset = "";
const tzOffset = originalDate.getTimezoneOffset();
if (tzOffset !== 0) {
const absoluteOffset = Math.abs(tzOffset);
const hourOffset = addLeadingZeros(Math.trunc(absoluteOffset / 60), 2);
const minuteOffset = addLeadingZeros(absoluteOffset % 60, 2);
// If less than 0, the sign is +, because it is ahead of time.
const sign = tzOffset < 0 ? "+" : "-";
offset = `${sign}${hourOffset}:${minuteOffset}`;
} else {
offset = "Z";
}
return offset;
}
export function fakeDate(date) {
let clock;
function fakeNow(date) {
clock?.restore();
clock = sinon.useFakeTimers(+date);
}
beforeEach(() => {
fakeNow(+date);
});
afterEach(() => {
clock?.restore();
clock = undefined;
});
return { fakeNow };
}