From d196900c77c69c0ecb991d52e0be9e6db3888940 Mon Sep 17 00:00:00 2001 From: Benny Powers Date: Sun, 2 Jul 2023 13:18:36 +0300 Subject: [PATCH] test: slots in dsd --- test/shadowdom-test.js | 23 ++++++++++++++++++- .../stubs/components/shadowrootmode-slot.webc | 6 +++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 test/stubs/components/shadowrootmode-slot.webc diff --git a/test/shadowdom-test.js b/test/shadowdom-test.js index 20a37ef..d2723e7 100644 --- a/test/shadowdom-test.js +++ b/test/shadowdom-test.js @@ -56,4 +56,25 @@ test("Using a web component with a declarative shadow root using shadowrootmode" Hello World! After`); -}); \ No newline at end of file +}); + +test("Using a web component with a declarative shadow root using shadowrootmode and a slot", async t => { + let { html, css, js, components } = await testGetResultFor("./test/stubs/nested.webc", { + "web-component": "./test/stubs/components/shadowrootmode-slot.webc" + }, {}); + + t.deepEqual(js, []); + t.deepEqual(css, []); + t.deepEqual(components, [ + "./test/stubs/nested.webc", + "./test/stubs/components/shadowrootmode-slot.webc" + ]); + t.is(html, `Before +World +After`); +}); diff --git a/test/stubs/components/shadowrootmode-slot.webc b/test/stubs/components/shadowrootmode-slot.webc new file mode 100644 index 0000000..2fbc8c5 --- /dev/null +++ b/test/stubs/components/shadowrootmode-slot.webc @@ -0,0 +1,6 @@ +