|
|
|
@ -339,6 +339,18 @@ describe('UIX layer contracts', () => {
|
|
|
|
expect(violations).toEqual([]);
|
|
|
|
expect(violations).toEqual([]);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it('guards Soma component timers through the injected scheduler', () => {
|
|
|
|
|
|
|
|
const allowedFallback = join(HERE, 'soma', 'components', 'announce', 'global.svelte.ts');
|
|
|
|
|
|
|
|
const violations = listSourceFiles(join(HERE, 'soma', 'components')).filter((file) => {
|
|
|
|
|
|
|
|
if (file === allowedFallback) return false;
|
|
|
|
|
|
|
|
return /\bsetTimeout\(|\bclearTimeout\(|\bsetInterval\(|\bclearInterval\(/.test(
|
|
|
|
|
|
|
|
stripComments(readFileSync(file, 'utf8'))
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
expect(violations).toEqual([]);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
it('guards hardcoded Soma component data attrs with morfo contracts', () => {
|
|
|
|
it('guards hardcoded Soma component data attrs with morfo contracts', () => {
|
|
|
|
const knownAttrs = collectKnownMorfoDataAttrs();
|
|
|
|
const knownAttrs = collectKnownMorfoDataAttrs();
|
|
|
|
const violations = listSourceFiles(join(HERE, 'soma', 'components')).flatMap((file) => {
|
|
|
|
const violations = listSourceFiles(join(HERE, 'soma', 'components')).flatMap((file) => {
|
|
|
|
|