summaryrefslogtreecommitdiff
path: root/packages/astro/test/view-transitions.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/astro/test/view-transitions.test.js')
-rw-r--r--packages/astro/test/view-transitions.test.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/astro/test/view-transitions.test.js b/packages/astro/test/view-transitions.test.js
index 6d4d19cbb..008a6e09f 100644
--- a/packages/astro/test/view-transitions.test.js
+++ b/packages/astro/test/view-transitions.test.js
@@ -22,4 +22,14 @@ describe('View Transitions styles', () => {
expect($('head style')).to.have.a.lengthOf(3);
});
+
+ it('should not duplicate transition attributes on island contents', async () => {
+ let res = await fixture.fetch('/hasIsland');
+ let html = await res.text();
+ let $ = cheerio.load(html);
+ expect($('astro-island[data-astro-transition-persist]')).to.have.a.lengthOf(1);
+ expect(
+ $('astro-island[data-astro-transition-persist] > [data-astro-transition-persist]')
+ ).to.have.a.lengthOf(0);
+ });
});