From c6046fe29eaa7e552af7b72bbfd72962b513bb84 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Mon, 27 May 2019 12:14:51 +0200 Subject: [PATCH] update tests --- test/js/samples/debug-empty/expected.js | 2 +- test/js/samples/debug-foo-bar-baz-things/expected.js | 2 +- test/js/samples/debug-foo/expected.js | 2 +- test/js/samples/dev-warning-missing-data-computed/expected.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/js/samples/debug-empty/expected.js b/test/js/samples/debug-empty/expected.js index c82cbeddd3..6f07993590 100644 --- a/test/js/samples/debug-empty/expected.js +++ b/test/js/samples/debug-empty/expected.js @@ -67,7 +67,7 @@ function instance($$self, $$props, $$invalidate) { const writable_props = ['name']; Object.keys($$props).forEach(key => { - if (!writable_props.includes(key)) console.warn(` was created with unknown prop '${key}'`); + if (!writable_props.includes(key) && !key.startsWith('$$')) console.warn(` was created with unknown prop '${key}'`); }); $$self.$set = $$props => { diff --git a/test/js/samples/debug-foo-bar-baz-things/expected.js b/test/js/samples/debug-foo-bar-baz-things/expected.js index 3e1571b890..eea35d5ba7 100644 --- a/test/js/samples/debug-foo-bar-baz-things/expected.js +++ b/test/js/samples/debug-foo-bar-baz-things/expected.js @@ -153,7 +153,7 @@ function instance($$self, $$props, $$invalidate) { const writable_props = ['things', 'foo', 'bar', 'baz']; Object.keys($$props).forEach(key => { - if (!writable_props.includes(key)) console.warn(` was created with unknown prop '${key}'`); + if (!writable_props.includes(key) && !key.startsWith('$$')) console.warn(` was created with unknown prop '${key}'`); }); $$self.$set = $$props => { diff --git a/test/js/samples/debug-foo/expected.js b/test/js/samples/debug-foo/expected.js index 1af0fcaebe..5b931d9464 100644 --- a/test/js/samples/debug-foo/expected.js +++ b/test/js/samples/debug-foo/expected.js @@ -153,7 +153,7 @@ function instance($$self, $$props, $$invalidate) { const writable_props = ['things', 'foo']; Object.keys($$props).forEach(key => { - if (!writable_props.includes(key)) console.warn(` was created with unknown prop '${key}'`); + if (!writable_props.includes(key) && !key.startsWith('$$')) console.warn(` was created with unknown prop '${key}'`); }); $$self.$set = $$props => { diff --git a/test/js/samples/dev-warning-missing-data-computed/expected.js b/test/js/samples/dev-warning-missing-data-computed/expected.js index 0c193934c0..5c4b2ece1b 100644 --- a/test/js/samples/dev-warning-missing-data-computed/expected.js +++ b/test/js/samples/dev-warning-missing-data-computed/expected.js @@ -67,7 +67,7 @@ function instance($$self, $$props, $$invalidate) { const writable_props = ['foo']; Object.keys($$props).forEach(key => { - if (!writable_props.includes(key)) console.warn(` was created with unknown prop '${key}'`); + if (!writable_props.includes(key) && !key.startsWith('$$')) console.warn(` was created with unknown prop '${key}'`); }); $$self.$set = $$props => {