From ebb77dab87e5ab592e7d1719e879d5e523494719 Mon Sep 17 00:00:00 2001 From: Yuichiro Yamashita Date: Fri, 14 Oct 2022 22:42:06 +0900 Subject: [PATCH] add tests --- .../attribute-boolean-indeterminate/_config.js | 4 ---- .../samples/attribute-boolean-inert/_config.js | 11 +++++++++++ .../samples/attribute-boolean-inert/main.svelte | 5 +++++ 3 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 test/runtime/samples/attribute-boolean-inert/_config.js create mode 100644 test/runtime/samples/attribute-boolean-inert/main.svelte diff --git a/test/runtime/samples/attribute-boolean-indeterminate/_config.js b/test/runtime/samples/attribute-boolean-indeterminate/_config.js index d6e97ffc0e..aafb0ec164 100644 --- a/test/runtime/samples/attribute-boolean-indeterminate/_config.js +++ b/test/runtime/samples/attribute-boolean-indeterminate/_config.js @@ -1,8 +1,4 @@ export default { - // This is a bit of a funny one — there's no equivalent attribute, - // so it can't be server-rendered - skip_if_ssr: true, - props: { indeterminate: true }, diff --git a/test/runtime/samples/attribute-boolean-inert/_config.js b/test/runtime/samples/attribute-boolean-inert/_config.js new file mode 100644 index 0000000000..8f99b4ebd8 --- /dev/null +++ b/test/runtime/samples/attribute-boolean-inert/_config.js @@ -0,0 +1,11 @@ +export default { + props: { + inert: true + }, + test({ assert, target, component }) { + const div = target.querySelector('div'); + assert.ok(div.inert); + component.inert = false; + assert.ok(!div.inert); + } +}; diff --git a/test/runtime/samples/attribute-boolean-inert/main.svelte b/test/runtime/samples/attribute-boolean-inert/main.svelte new file mode 100644 index 0000000000..6c3df7e31e --- /dev/null +++ b/test/runtime/samples/attribute-boolean-inert/main.svelte @@ -0,0 +1,5 @@ + + +
some div