From c77f55d9c075569be018dc1fb5a42c932b9071c7 Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Fri, 27 Oct 2023 08:11:46 -0400 Subject: Prevent passing slot names as props (#8930) Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com> Co-authored-by: Nate Moore <7118177+natemoo-re@users.noreply.github.com> --- packages/integrations/vue/test/basics.test.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 packages/integrations/vue/test/basics.test.js (limited to 'packages/integrations/vue/test/basics.test.js') diff --git a/packages/integrations/vue/test/basics.test.js b/packages/integrations/vue/test/basics.test.js new file mode 100644 index 000000000..a4bdc7f87 --- /dev/null +++ b/packages/integrations/vue/test/basics.test.js @@ -0,0 +1,24 @@ +import { loadFixture } from './test-utils.js'; +import { expect } from 'chai'; +import { parseHTML } from 'linkedom'; +describe('Basics', () => { + /** @type {import('./test-utils').Fixture} */ + let fixture; + + before(async () => { + fixture = await loadFixture({ + root: './fixtures/basics/', + }); + await fixture.build(); + }); + + it('Slots are added without the slot attribute', async () => { + const data = await fixture.readFile('/index.html'); + const { document } = parseHTML(data); + const bar = document.querySelector('#foo'); + + expect(bar).not.to.be.undefined; + expect(bar.getAttribute('slot')).to.be.null; + }); + +}); -- cgit v1.2.3