mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-29 03:09:36 +00:00
Validate / hacs (push) Failing after 12s
Validate / hassfest (push) Failing after 13s
Validate / frontend (push) Successful in 3m2s
Validate / golden (push) Failing after 51s
Validate / backend (push) Failing after 6m50s
Validate / smoke (push) Failing after 13m44s
Validate / performance (push) Failing after 24m13s
20 lines
743 B
JavaScript
20 lines
743 B
JavaScript
import test from 'node:test';
|
|
import assert from 'node:assert/strict';
|
|
import { deviceFaceStyle } from '../test-build/device-face.js';
|
|
|
|
const face = (rippleColor) => ({
|
|
display: 'icon_ripple', scale: 1, rippleScale: 3, rippleColor,
|
|
});
|
|
|
|
test('device face never emits an arbitrary persisted ripple declaration', () => {
|
|
assert.deepEqual(deviceFaceStyle(face('#12aBcD')), [
|
|
'--ripple-scale:3', '--ripple-color:#12aBcD',
|
|
]);
|
|
assert.deepEqual(deviceFaceStyle(face('rgb(12, 140, 250)')), [
|
|
'--ripple-scale:3', '--ripple-color:rgb(12, 140, 250)',
|
|
]);
|
|
const hostile = deviceFaceStyle(face('red;position:fixed;inset:0'));
|
|
assert.deepEqual(hostile, ['--ripple-scale:3']);
|
|
assert.ok(!hostile.join(';').includes('position'));
|
|
});
|