Skip to content

Commit dda69db

Browse files
committed
update tests
1 parent cb1a76b commit dda69db

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

test/js/samples/debug-empty/expected.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function instance($$self, $$props, $$invalidate) {
6767

6868
const writable_props = ['name'];
6969
Object.keys($$props).forEach(key => {
70-
if (!writable_props.includes(key)) console.warn(`<Component> was created with unknown prop '${key}'`);
70+
if (!writable_props.includes(key) && !key.startsWith('$$')) console.warn(`<Component> was created with unknown prop '${key}'`);
7171
});
7272

7373
$$self.$set = $$props => {

test/js/samples/debug-foo-bar-baz-things/expected.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ function instance($$self, $$props, $$invalidate) {
153153

154154
const writable_props = ['things', 'foo', 'bar', 'baz'];
155155
Object.keys($$props).forEach(key => {
156-
if (!writable_props.includes(key)) console.warn(`<Component> was created with unknown prop '${key}'`);
156+
if (!writable_props.includes(key) && !key.startsWith('$$')) console.warn(`<Component> was created with unknown prop '${key}'`);
157157
});
158158

159159
$$self.$set = $$props => {

test/js/samples/debug-foo/expected.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ function instance($$self, $$props, $$invalidate) {
153153

154154
const writable_props = ['things', 'foo'];
155155
Object.keys($$props).forEach(key => {
156-
if (!writable_props.includes(key)) console.warn(`<Component> was created with unknown prop '${key}'`);
156+
if (!writable_props.includes(key) && !key.startsWith('$$')) console.warn(`<Component> was created with unknown prop '${key}'`);
157157
});
158158

159159
$$self.$set = $$props => {

test/js/samples/dev-warning-missing-data-computed/expected.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function instance($$self, $$props, $$invalidate) {
6767

6868
const writable_props = ['foo'];
6969
Object.keys($$props).forEach(key => {
70-
if (!writable_props.includes(key)) console.warn(`<Component> was created with unknown prop '${key}'`);
70+
if (!writable_props.includes(key) && !key.startsWith('$$')) console.warn(`<Component> was created with unknown prop '${key}'`);
7171
});
7272

7373
$$self.$set = $$props => {

0 commit comments

Comments
 (0)