diff --git a/test/hydration/samples/expression-sibling/_after.html b/test/hydration/samples/expression-sibling/_after.html new file mode 100644 index 0000000000..9c0a0b5778 --- /dev/null +++ b/test/hydration/samples/expression-sibling/_after.html @@ -0,0 +1 @@ +
1 2 3
diff --git a/test/hydration/samples/expression-sibling/_before.html b/test/hydration/samples/expression-sibling/_before.html new file mode 100644 index 0000000000..9c0a0b5778 --- /dev/null +++ b/test/hydration/samples/expression-sibling/_before.html @@ -0,0 +1 @@ +1 2 3
diff --git a/test/hydration/samples/expression-sibling/_config.js b/test/hydration/samples/expression-sibling/_config.js new file mode 100644 index 0000000000..9cc0554776 --- /dev/null +++ b/test/hydration/samples/expression-sibling/_config.js @@ -0,0 +1,19 @@ +export default { + snapshot(target) { + const p = target.querySelector("p"); + + return { + p, + text: p.childNodes[0], + span: p.querySelector("span"), + }; + }, + + test(assert, target, snapshot) { + const p = target.querySelector("p"); + + assert.equal(p, snapshot.p); + assert.equal(p.childNodes[0], snapshot.text); + assert.equal(p.querySelector("span"), snapshot.span); + }, +}; diff --git a/test/hydration/samples/expression-sibling/main.svelte b/test/hydration/samples/expression-sibling/main.svelte new file mode 100644 index 0000000000..65aa541e9c --- /dev/null +++ b/test/hydration/samples/expression-sibling/main.svelte @@ -0,0 +1 @@ +{1} 2 3