diff --git a/test/js/samples/debug-empty/expected.js b/test/js/samples/debug-empty/expected.js index 3c65e5a950..b545823c57 100644 --- a/test/js/samples/debug-empty/expected.js +++ b/test/js/samples/debug-empty/expected.js @@ -72,7 +72,7 @@ function instance($$self, $$props, $$invalidate) { const writable_props = ["name"]; Object.keys($$props).forEach(key => { - if (!writable_props.includes(key) && !key.startsWith("$$")) console.warn(` was created with unknown prop '${key}'`); + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") 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 4d6a0f61c6..448fc82176 100644 --- a/test/js/samples/debug-foo-bar-baz-things/expected.js +++ b/test/js/samples/debug-foo-bar-baz-things/expected.js @@ -167,7 +167,7 @@ function instance($$self, $$props, $$invalidate) { const writable_props = ["things", "foo", "bar", "baz"]; Object.keys($$props).forEach(key => { - if (!writable_props.includes(key) && !key.startsWith("$$")) console.warn(` was created with unknown prop '${key}'`); + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") 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 3f502bc0ca..8abfd1bae1 100644 --- a/test/js/samples/debug-foo/expected.js +++ b/test/js/samples/debug-foo/expected.js @@ -165,7 +165,7 @@ function instance($$self, $$props, $$invalidate) { const writable_props = ["things", "foo"]; Object.keys($$props).forEach(key => { - if (!writable_props.includes(key) && !key.startsWith("$$")) console.warn(` was created with unknown prop '${key}'`); + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") 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 f362a42db6..5da2b4aead 100644 --- a/test/js/samples/dev-warning-missing-data-computed/expected.js +++ b/test/js/samples/dev-warning-missing-data-computed/expected.js @@ -69,7 +69,7 @@ function instance($$self, $$props, $$invalidate) { const writable_props = ["foo"]; Object.keys($$props).forEach(key => { - if (!writable_props.includes(key) && !key.startsWith("$$")) console.warn(` was created with unknown prop '${key}'`); + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); }); $$self.$set = $$props => {