Skip to content

Commit 152516e

Browse files
committed
update test fixtures
1 parent a65088c commit 152516e

File tree

39 files changed

+84
-5
lines changed

39 files changed

+84
-5
lines changed

test/js/samples/action-custom-event-handler/expected.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
element,
77
init,
88
insert,
9+
is_empty,
910
is_function,
1011
noop,
1112
safe_not_equal
@@ -56,6 +57,7 @@ function instance($$self, $$props, $$invalidate) {
5657
const foo_function = () => handleFoo(bar);
5758

5859
$$self.$set = $$props => {
60+
if (is_empty($$props)) return;
5961
if ("bar" in $$props) $$invalidate(0, bar = $$props.bar);
6062
};
6163

test/js/samples/bind-open/expected.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
element,
66
init,
77
insert,
8+
is_empty,
89
listen,
910
noop,
1011
safe_not_equal
@@ -53,6 +54,7 @@ function instance($$self, $$props, $$invalidate) {
5354
}
5455

5556
$$self.$set = $$props => {
57+
if (is_empty($$props)) return;
5658
if ("open" in $$props) $$invalidate(0, open = $$props.open);
5759
};
5860

test/js/samples/bind-width-height/expected.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
element,
88
init,
99
insert,
10+
is_empty,
1011
noop,
1112
safe_not_equal
1213
} from "svelte/internal";
@@ -47,6 +48,7 @@ function instance($$self, $$props, $$invalidate) {
4748
}
4849

4950
$$self.$set = $$props => {
51+
if (is_empty($$props)) return;
5052
if ("w" in $$props) $$invalidate(0, w = $$props.w);
5153
if ("h" in $$props) $$invalidate(1, h = $$props.h);
5254
};

test/js/samples/bindings-readonly-order/expected.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
element,
77
init,
88
insert,
9+
is_empty,
910
listen,
1011
noop,
1112
run_all,
@@ -69,6 +70,7 @@ function instance($$self, $$props, $$invalidate) {
6970
}
7071

7172
$$self.$set = $$props => {
73+
if (is_empty($$props)) return;
7274
if ("files" in $$props) $$invalidate(0, files = $$props.files);
7375
};
7476

test/js/samples/capture-inject-state/expected.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
element,
99
init,
1010
insert_dev,
11+
is_empty,
1112
noop,
1213
safe_not_equal,
1314
set_data_dev,
@@ -119,6 +120,7 @@ function instance($$self, $$props, $$invalidate) {
119120
validate_slots("Component", $$slots, []);
120121

121122
$$self.$set = $$props => {
123+
if (is_empty($$props)) return;
122124
if ("prop" in $$props) $$subscribe_prop($$invalidate(0, prop = $$props.prop));
123125
if ("alias" in $$props) $$invalidate(1, realName = $$props.alias);
124126
};

test/js/samples/collapses-text-around-comments/expected.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
element,
88
init,
99
insert,
10+
is_empty,
1011
noop,
1112
safe_not_equal,
1213
set_data,
@@ -49,6 +50,7 @@ function instance($$self, $$props, $$invalidate) {
4950
let { foo = 42 } = $$props;
5051

5152
$$self.$set = $$props => {
53+
if (is_empty($$props)) return;
5254
if ("foo" in $$props) $$invalidate(0, foo = $$props.foo);
5355
};
5456

test/js/samples/computed-collapsed-if/expected.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* generated by Svelte vX.Y.Z */
2-
import { SvelteComponent, init, safe_not_equal } from "svelte/internal";
2+
import { SvelteComponent, init, is_empty, safe_not_equal } from "svelte/internal";
33

44
function instance($$self, $$props, $$invalidate) {
55
let { x } = $$props;
@@ -13,6 +13,7 @@ function instance($$self, $$props, $$invalidate) {
1313
}
1414

1515
$$self.$set = $$props => {
16+
if (is_empty($$props)) return;
1617
if ("x" in $$props) $$invalidate(0, x = $$props.x);
1718
};
1819

test/js/samples/data-attribute/expected.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
element,
77
init,
88
insert,
9+
is_empty,
910
noop,
1011
safe_not_equal,
1112
space
@@ -48,6 +49,7 @@ function instance($$self, $$props, $$invalidate) {
4849
let { bar } = $$props;
4950

5051
$$self.$set = $$props => {
52+
if (is_empty($$props)) return;
5153
if ("bar" in $$props) $$invalidate(0, bar = $$props.bar);
5254
};
5355

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
element,
99
init,
1010
insert_dev,
11+
is_empty,
1112
noop,
1213
safe_not_equal,
1314
set_data_dev,
@@ -80,6 +81,7 @@ function instance($$self, $$props, $$invalidate) {
8081
validate_slots("Component", $$slots, []);
8182

8283
$$self.$set = $$props => {
84+
if (is_empty($$props)) return;
8385
if ("name" in $$props) $$invalidate(0, name = $$props.name);
8486
};
8587

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
element,
1010
init,
1111
insert_dev,
12+
is_empty,
1213
noop,
1314
safe_not_equal,
1415
set_data_dev,
@@ -184,6 +185,7 @@ function instance($$self, $$props, $$invalidate) {
184185
validate_slots("Component", $$slots, []);
185186

186187
$$self.$set = $$props => {
188+
if (is_empty($$props)) return;
187189
if ("things" in $$props) $$invalidate(0, things = $$props.things);
188190
if ("foo" in $$props) $$invalidate(1, foo = $$props.foo);
189191
if ("bar" in $$props) $$invalidate(2, bar = $$props.bar);

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
element,
1010
init,
1111
insert_dev,
12+
is_empty,
1213
noop,
1314
safe_not_equal,
1415
set_data_dev,
@@ -176,6 +177,7 @@ function instance($$self, $$props, $$invalidate) {
176177
validate_slots("Component", $$slots, []);
177178

178179
$$self.$set = $$props => {
180+
if (is_empty($$props)) return;
179181
if ("things" in $$props) $$invalidate(0, things = $$props.things);
180182
if ("foo" in $$props) $$invalidate(1, foo = $$props.foo);
181183
};

test/js/samples/deconflict-builtins/expected.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
empty,
99
init,
1010
insert,
11+
is_empty,
1112
noop,
1213
safe_not_equal,
1314
set_data,
@@ -105,6 +106,7 @@ function instance($$self, $$props, $$invalidate) {
105106
let { createElement } = $$props;
106107

107108
$$self.$set = $$props => {
109+
if (is_empty($$props)) return;
108110
if ("createElement" in $$props) $$invalidate(0, createElement = $$props.createElement);
109111
};
110112

test/js/samples/deconflict-globals/expected.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* generated by Svelte vX.Y.Z */
2-
import { SvelteComponent, init, safe_not_equal } from "svelte/internal";
2+
import { SvelteComponent, init, is_empty, safe_not_equal } from "svelte/internal";
33

44
import { onMount } from "svelte";
55

@@ -11,6 +11,7 @@ function instance($$self, $$props, $$invalidate) {
1111
});
1212

1313
$$self.$set = $$props => {
14+
if (is_empty($$props)) return;
1415
if ("foo" in $$props) $$invalidate(0, foo = $$props.foo);
1516
};
1617

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
element,
99
init,
1010
insert_dev,
11+
is_empty,
1112
noop,
1213
safe_not_equal,
1314
set_data_dev,
@@ -77,6 +78,7 @@ function instance($$self, $$props, $$invalidate) {
7778
validate_slots("Component", $$slots, []);
7879

7980
$$self.$set = $$props => {
81+
if (is_empty($$props)) return;
8082
if ("foo" in $$props) $$invalidate(0, foo = $$props.foo);
8183
};
8284

test/js/samples/each-block-array-literal/expected.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
empty,
99
init,
1010
insert,
11+
is_empty,
1112
noop,
1213
safe_not_equal,
1314
set_data,
@@ -107,6 +108,7 @@ function instance($$self, $$props, $$invalidate) {
107108
let { e } = $$props;
108109

109110
$$self.$set = $$props => {
111+
if (is_empty($$props)) return;
110112
if ("a" in $$props) $$invalidate(0, a = $$props.a);
111113
if ("b" in $$props) $$invalidate(1, b = $$props.b);
112114
if ("c" in $$props) $$invalidate(2, c = $$props.c);

test/js/samples/each-block-changed-check/expected.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
element,
1010
init,
1111
insert,
12+
is_empty,
1213
noop,
1314
safe_not_equal,
1415
set_data,
@@ -153,6 +154,7 @@ function instance($$self, $$props, $$invalidate) {
153154
let { foo } = $$props;
154155

155156
$$self.$set = $$props => {
157+
if (is_empty($$props)) return;
156158
if ("comments" in $$props) $$invalidate(0, comments = $$props.comments);
157159
if ("elapsed" in $$props) $$invalidate(1, elapsed = $$props.elapsed);
158160
if ("time" in $$props) $$invalidate(2, time = $$props.time);

test/js/samples/each-block-keyed-animated/expected.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
fix_position,
1111
init,
1212
insert,
13+
is_empty,
1314
noop,
1415
safe_not_equal,
1516
set_data,
@@ -129,6 +130,7 @@ function instance($$self, $$props, $$invalidate) {
129130
let { things } = $$props;
130131

131132
$$self.$set = $$props => {
133+
if (is_empty($$props)) return;
132134
if ("things" in $$props) $$invalidate(0, things = $$props.things);
133135
};
134136

test/js/samples/each-block-keyed/expected.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
empty,
99
init,
1010
insert,
11+
is_empty,
1112
noop,
1213
safe_not_equal,
1314
set_data,
@@ -98,6 +99,7 @@ function instance($$self, $$props, $$invalidate) {
9899
let { things } = $$props;
99100

100101
$$self.$set = $$props => {
102+
if (is_empty($$props)) return;
101103
if ("things" in $$props) $$invalidate(0, things = $$props.things);
102104
};
103105

test/js/samples/if-block-no-update/expected.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
empty,
77
init,
88
insert,
9+
is_empty,
910
noop,
1011
safe_not_equal
1112
} from "svelte/internal";
@@ -89,6 +90,7 @@ function instance($$self, $$props, $$invalidate) {
8990
let { foo } = $$props;
9091

9192
$$self.$set = $$props => {
93+
if (is_empty($$props)) return;
9294
if ("foo" in $$props) $$invalidate(0, foo = $$props.foo);
9395
};
9496

test/js/samples/if-block-simple/expected.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
empty,
77
init,
88
insert,
9+
is_empty,
910
noop,
1011
safe_not_equal
1112
} from "svelte/internal";
@@ -67,6 +68,7 @@ function instance($$self, $$props, $$invalidate) {
6768
let { foo } = $$props;
6869

6970
$$self.$set = $$props => {
71+
if (is_empty($$props)) return;
7072
if ("foo" in $$props) $$invalidate(0, foo = $$props.foo);
7173
};
7274

test/js/samples/inline-style-optimized-multiple/expected.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
element,
66
init,
77
insert,
8+
is_empty,
89
noop,
910
safe_not_equal,
1011
set_style
@@ -45,6 +46,7 @@ function instance($$self, $$props, $$invalidate) {
4546
let { y } = $$props;
4647

4748
$$self.$set = $$props => {
49+
if (is_empty($$props)) return;
4850
if ("color" in $$props) $$invalidate(0, color = $$props.color);
4951
if ("x" in $$props) $$invalidate(1, x = $$props.x);
5052
if ("y" in $$props) $$invalidate(2, y = $$props.y);

test/js/samples/inline-style-optimized-url/expected.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
element,
66
init,
77
insert,
8+
is_empty,
89
noop,
910
safe_not_equal,
1011
set_style
@@ -38,6 +39,7 @@ function instance($$self, $$props, $$invalidate) {
3839
let { data } = $$props;
3940

4041
$$self.$set = $$props => {
42+
if (is_empty($$props)) return;
4143
if ("data" in $$props) $$invalidate(0, data = $$props.data);
4244
};
4345

test/js/samples/inline-style-optimized/expected.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
element,
66
init,
77
insert,
8+
is_empty,
89
noop,
910
safe_not_equal,
1011
set_style
@@ -38,6 +39,7 @@ function instance($$self, $$props, $$invalidate) {
3839
let { color } = $$props;
3940

4041
$$self.$set = $$props => {
42+
if (is_empty($$props)) return;
4143
if ("color" in $$props) $$invalidate(0, color = $$props.color);
4244
};
4345

test/js/samples/inline-style-unoptimized/expected.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
element,
77
init,
88
insert,
9+
is_empty,
910
noop,
1011
safe_not_equal,
1112
space
@@ -55,6 +56,7 @@ function instance($$self, $$props, $$invalidate) {
5556
let { value } = $$props;
5657

5758
$$self.$set = $$props => {
59+
if (is_empty($$props)) return;
5860
if ("style" in $$props) $$invalidate(0, style = $$props.style);
5961
if ("key" in $$props) $$invalidate(1, key = $$props.key);
6062
if ("value" in $$props) $$invalidate(2, value = $$props.value);

test/js/samples/input-files/expected.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
element,
77
init,
88
insert,
9+
is_empty,
910
listen,
1011
noop,
1112
safe_not_equal
@@ -50,6 +51,7 @@ function instance($$self, $$props, $$invalidate) {
5051
}
5152

5253
$$self.$set = $$props => {
54+
if (is_empty($$props)) return;
5355
if ("files" in $$props) $$invalidate(0, files = $$props.files);
5456
};
5557

0 commit comments

Comments
 (0)