Files
headroom/frontend/node_modules/fast-check/lib/check/property/IgnoreEqualValuesProperty.js
Santhosh Janardhanan de2d83092e feat: Reinitialize frontend with SvelteKit and TypeScript
- Delete old Vite+Svelte frontend
- Initialize new SvelteKit project with TypeScript
- Configure Tailwind CSS v4 + DaisyUI
- Implement JWT authentication with auto-refresh
- Create login page with form validation (Zod)
- Add protected route guards
- Update Docker configuration for single-stage build
- Add E2E tests with Playwright (6/11 passing)
- Fix Svelte 5 reactivity with $state() runes

Known issues:
- 5 E2E tests failing (timing/async issues)
- Token refresh implementation needs debugging
- Validation error display timing
2026-02-17 16:19:59 -05:00

51 lines
1.8 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.IgnoreEqualValuesProperty = void 0;
const stringify_1 = require("../../utils/stringify");
const PreconditionFailure_1 = require("../precondition/PreconditionFailure");
function fromSyncCached(cachedValue) {
return cachedValue === null ? new PreconditionFailure_1.PreconditionFailure() : cachedValue;
}
function fromCached(...data) {
if (data[1])
return data[0].then(fromSyncCached);
return fromSyncCached(data[0]);
}
function fromCachedUnsafe(cachedValue, isAsync) {
return fromCached(cachedValue, isAsync);
}
class IgnoreEqualValuesProperty {
constructor(property, skipRuns) {
this.property = property;
this.skipRuns = skipRuns;
this.coveredCases = new Map();
if (this.property.runBeforeEach !== undefined && this.property.runAfterEach !== undefined) {
this.runBeforeEach = () => this.property.runBeforeEach();
this.runAfterEach = () => this.property.runAfterEach();
}
}
isAsync() {
return this.property.isAsync();
}
generate(mrng, runId) {
return this.property.generate(mrng, runId);
}
shrink(value) {
return this.property.shrink(value);
}
run(v, dontRunHook) {
const stringifiedValue = (0, stringify_1.stringify)(v);
if (this.coveredCases.has(stringifiedValue)) {
const lastOutput = this.coveredCases.get(stringifiedValue);
if (!this.skipRuns) {
return lastOutput;
}
return fromCachedUnsafe(lastOutput, this.property.isAsync());
}
const out = this.property.run(v, dontRunHook);
this.coveredCases.set(stringifiedValue, out);
return out;
}
}
exports.IgnoreEqualValuesProperty = IgnoreEqualValuesProperty;