mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-03 13:18:58 +00:00
@@ -21,6 +21,11 @@ test('golden matrix has stable unique ids and bounded comparison thresholds', ()
|
||||
assert.equal(Number.isInteger(region.minPixels) && region.minPixels > 0, true, scenario.id);
|
||||
assert.equal(region.minRedBlueDelta > 0, true, scenario.id);
|
||||
}
|
||||
if (scenario.labs) {
|
||||
assert.deepEqual(scenario.labs, ['iso'], scenario.id);
|
||||
assert.equal(scenario.projection, 'iso', scenario.id);
|
||||
assert.equal(scenario.mode, 'view', scenario.id);
|
||||
}
|
||||
if (scenario.sunRayPixels) {
|
||||
assert.equal(Number.isInteger(scenario.sunRayPixels.minPixels)
|
||||
&& scenario.sunRayPixels.minPixels > 0, true, scenario.id);
|
||||
@@ -64,7 +69,9 @@ test('golden matrix covers required geometry, rendering and adaptive surfaces',
|
||||
'fill-light', 'fill-temp', 'fill-lqi', 'lighting', 'hover', 'zoom-040', 'zoom-250',
|
||||
'warm-remount', 'dialog-mobile', 'color-popover', 'tray-wide', 'tray-medium', 'sun-window',
|
||||
'tray-narrow', 'opaque-glow-two-doorways', 'filled-tunnel', 'opening-placement',
|
||||
'backup-full', 'backup-space', 'value-badge-positions'])
|
||||
'backup-full', 'backup-space', 'value-badge-positions', 'isometric-geometry',
|
||||
'isometric-live-layers', 'isometric-no-borders', 'isometric-touch-kiosk',
|
||||
'isometric-large-warm-remount'])
|
||||
assert.equal(ids.includes(token), true, token);
|
||||
assert.equal(new Set(GOLDEN_SCENARIOS.map((scenario) => scenario.mode)).has('plan'), true);
|
||||
assert.equal(new Set(GOLDEN_SCENARIOS.map((scenario) => scenario.mode)).has('devices'), true);
|
||||
|
||||
+7
-1
@@ -2,6 +2,7 @@ import test from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import {
|
||||
LABS_FLAGS, hashSpace, liveLabsFlags, parseVersionCore, resolveLabs, validLabsFlag,
|
||||
validLabsRegistry,
|
||||
} from '../test-build/labs.js';
|
||||
|
||||
const resolve = (search = '', hash = '', storage = null, version = '1.62.0') =>
|
||||
@@ -15,6 +16,12 @@ test('registry metadata and numeric-core lifetime fail closed', () => {
|
||||
assert.equal(liveLabsFlags('1.65.0').has('iso'), false);
|
||||
assert.equal(liveLabsFlags('not-a-version').size, 0);
|
||||
assert.equal(validLabsFlag({ ...LABS_FLAGS[0], since: '1.65.0' }), false);
|
||||
assert.equal(validLabsRegistry([LABS_FLAGS[0], { ...LABS_FLAGS[0] }]), false);
|
||||
assert.equal(liveLabsFlags('1.62.0', [LABS_FLAGS[0], { ...LABS_FLAGS[0] }]).size, 0);
|
||||
assert.deepEqual(resolveLabs(
|
||||
{ search: '?hp-labs=iso', hash: '' }, '["iso"]', '1.62.0',
|
||||
[LABS_FLAGS[0], { ...LABS_FLAGS[0] }],
|
||||
).active, []);
|
||||
});
|
||||
|
||||
test('URL operations are ordered query then hash with off and removal semantics', () => {
|
||||
@@ -48,4 +55,3 @@ test('malformed and unavailable storage are safe', () => {
|
||||
assert.deepEqual(resolve('', '', '{bad').active, []);
|
||||
assert.deepEqual(resolve('?hp-labs=iso', '', undefined).active, ['iso']);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user