mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 04:38:33 +00:00
fix(core): make timing masks safe for source loaders
This commit is contained in:
@@ -168,6 +168,22 @@ describe("compileTimingAttrs", () => {
|
||||
expect(compiled).toContain('id="hf-video-0"');
|
||||
expect(compiled).toContain('data-end="2"');
|
||||
});
|
||||
|
||||
it("preserves inert regions when compiled output is compiled again", () => {
|
||||
const html = [
|
||||
'<style>.hero::after { content: "$& $$ $` $\' <video>"; }</style>',
|
||||
'<script>const markup = "$& $$ $` $\' <audio>";</script>',
|
||||
'<video class="hero" src="a.mp4" data-start="0" data-duration="2">',
|
||||
].join("\n");
|
||||
|
||||
const first = compileTimingAttrs(html).html;
|
||||
const second = compileTimingAttrs(first).html;
|
||||
|
||||
expect(second).toContain('<style>.hero::after { content: "$& $$ $` $\' <video>"; }</style>');
|
||||
expect(second).toContain('<script>const markup = "$& $$ $` $\' <audio>";</script>');
|
||||
expect(second).toContain('data-end="2"');
|
||||
expect(second).not.toContain("HFMASK");
|
||||
});
|
||||
});
|
||||
|
||||
describe("injectDurations", () => {
|
||||
|
||||
Reference in New Issue
Block a user