'
});
}
this.tag = this.component_options.tag || compile_options.tag;
@@ -235,7 +235,7 @@ export default class Component {
const { compile_options, name } = this;
const { format = 'esm' } = compile_options;
- const banner = `${this.file ? `${this.file} ` : ``}generated by Svelte v${'__VERSION__'}`;
+ const banner = `${this.file ? `${this.file} ` : ''}generated by Svelte v${'__VERSION__'}`;
const program: any = { type: 'Program', body: result.js };
@@ -452,16 +452,16 @@ export default class Component {
extract_exports(node) {
if (node.type === 'ExportDefaultDeclaration') {
this.error(node, {
- code: `default-export`,
- message: `A component cannot have a default export`
+ code: 'default-export',
+ message: 'A component cannot have a default export'
});
}
if (node.type === 'ExportNamedDeclaration') {
if (node.source) {
this.error(node, {
- code: `not-implemented`,
- message: `A component currently cannot have an export ... from`
+ code: 'not-implemented',
+ message: 'A component currently cannot have an export ... from'
});
}
if (node.declaration) {
@@ -472,7 +472,7 @@ export default class Component {
variable.export_name = name;
if (variable.writable && !(variable.referenced || variable.referenced_from_script || variable.subscribable)) {
this.warn(declarator, {
- code: `unused-export-let`,
+ code: 'unused-export-let',
message: `${this.name.name} has unused export property '${name}'. If it is for external reference only, please consider using \`export const ${name}\``
});
}
@@ -495,7 +495,7 @@ export default class Component {
if (variable.writable && !(variable.referenced || variable.referenced_from_script || variable.subscribable)) {
this.warn(specifier, {
- code: `unused-export-let`,
+ code: 'unused-export-let',
message: `${this.name.name} has unused export property '${specifier.exported.name}'. If it is for external reference only, please consider using \`export const ${specifier.exported.name}\``
});
}
@@ -544,7 +544,7 @@ export default class Component {
if (name[0] === '$') {
this.error(node as any, {
code: 'illegal-declaration',
- message: `The $ prefix is reserved, and cannot be used for variable and import names`
+ message: 'The $ prefix is reserved, and cannot be used for variable and import names'
});
}
@@ -562,7 +562,7 @@ export default class Component {
if (name[0] === '$') {
this.error(node as any, {
code: 'illegal-subscription',
- message: `Cannot reference store value inside `;
+ iframe.src = 'data:text/html,';
unsubscribe = listen(window, 'message', (event: MessageEvent) => {
if (event.source === iframe.contentWindow) fn();
});
diff --git a/src/runtime/internal/keyed_each.ts b/src/runtime/internal/keyed_each.ts
index b397335c87..6e333da1a4 100644
--- a/src/runtime/internal/keyed_each.ts
+++ b/src/runtime/internal/keyed_each.ts
@@ -113,7 +113,7 @@ export function validate_each_keys(ctx, list, get_context, get_key) {
for (let i = 0; i < list.length; i++) {
const key = get_key(get_context(ctx, list, i));
if (keys.has(key)) {
- throw new Error(`Cannot have duplicate keys in a keyed each`);
+ throw new Error('Cannot have duplicate keys in a keyed each');
}
keys.add(key);
}
diff --git a/src/runtime/internal/lifecycle.ts b/src/runtime/internal/lifecycle.ts
index 304e8d6a68..9e65e59cbd 100644
--- a/src/runtime/internal/lifecycle.ts
+++ b/src/runtime/internal/lifecycle.ts
@@ -7,7 +7,7 @@ export function set_current_component(component) {
}
export function get_current_component() {
- if (!current_component) throw new Error(`Function called outside component initialization`);
+ if (!current_component) throw new Error('Function called outside component initialization');
return current_component;
}
diff --git a/src/runtime/internal/ssr.ts b/src/runtime/internal/ssr.ts
index 646a81d817..bfd882aecf 100644
--- a/src/runtime/internal/ssr.ts
+++ b/src/runtime/internal/ssr.ts
@@ -21,9 +21,9 @@ export function spread(args, classes_to_add) {
if (invalid_attribute_name_character.test(name)) return;
const value = attributes[name];
- if (value === true) str += " " + name;
+ if (value === true) str += ' ' + name;
else if (boolean_attributes.has(name.toLowerCase())) {
- if (value) str += " " + name;
+ if (value) str += ' ' + name;
} else if (value != null) {
str += ` ${name}="${String(value).replace(/"/g, '"').replace(/'/g, ''')}"`;
}
@@ -34,7 +34,7 @@ export function spread(args, classes_to_add) {
export const escaped = {
'"': '"',
- "'": ''',
+ '\'': ''',
'&': '&',
'<': '<',
'>': '>'
@@ -133,5 +133,5 @@ export function add_attribute(name, value, boolean) {
}
export function add_classes(classes) {
- return classes ? ` class="${classes}"` : ``;
+ return classes ? ` class="${classes}"` : '';
}
\ No newline at end of file
diff --git a/src/runtime/internal/style_manager.ts b/src/runtime/internal/style_manager.ts
index 31d7573a76..8060e65a5d 100644
--- a/src/runtime/internal/style_manager.ts
+++ b/src/runtime/internal/style_manager.ts
@@ -40,7 +40,7 @@ export function create_rule(node: Element & ElementCSSInlineStyle, a: number, b:
}
const animation = node.style.animation || '';
- node.style.animation = `${animation ? `${animation}, ` : ``}${name} ${duration}ms linear ${delay}ms 1 both`;
+ node.style.animation = `${animation ? `${animation}, ` : ''}${name} ${duration}ms linear ${delay}ms 1 both`;
active += 1;
return name;
diff --git a/src/runtime/internal/transitions.ts b/src/runtime/internal/transitions.ts
index ed23d3c1dd..091573ace1 100644
--- a/src/runtime/internal/transitions.ts
+++ b/src/runtime/internal/transitions.ts
@@ -1,5 +1,5 @@
import { identity as linear, is_function, noop, run_all } from './utils';
-import { now } from "./environment";
+import { now } from './environment';
import { loop } from './loop';
import { create_rule, delete_rule } from './style_manager';
import { custom_event } from './dom';
diff --git a/src/runtime/transition/index.ts b/src/runtime/transition/index.ts
index f1197c0b17..7e879cb941 100644
--- a/src/runtime/transition/index.ts
+++ b/src/runtime/transition/index.ts
@@ -120,7 +120,7 @@ export function slide(node: Element, {
duration,
easing,
css: t =>
- `overflow: hidden;` +
+ 'overflow: hidden;' +
`opacity: ${Math.min(t * 20, 1) * opacity};` +
`height: ${t * height}px;` +
`padding-top: ${t * padding_top}px;` +
diff --git a/test/css/samples/empty-class/_config.js b/test/css/samples/empty-class/_config.js
index 064de4a564..725d805d65 100644
--- a/test/css/samples/empty-class/_config.js
+++ b/test/css/samples/empty-class/_config.js
@@ -1,7 +1,7 @@
export default {
warnings: [{
- filename: "SvelteComponent.svelte",
- code: `css-unused-selector`,
+ filename: 'SvelteComponent.svelte',
+ code: 'css-unused-selector',
message: 'Unused CSS selector ".x"',
start: {
line: 4,
diff --git a/test/css/samples/omit-scoping-attribute-descendant/_config.js b/test/css/samples/omit-scoping-attribute-descendant/_config.js
index 25e2a28ebb..b69a9041a5 100644
--- a/test/css/samples/omit-scoping-attribute-descendant/_config.js
+++ b/test/css/samples/omit-scoping-attribute-descendant/_config.js
@@ -1,6 +1,6 @@
export default {
warnings: [{
- code: `css-unused-selector`,
+ code: 'css-unused-selector',
message: 'Unused CSS selector "div > p"',
start: {
line: 8,
diff --git a/test/css/samples/unused-selector-child-combinator/_config.js b/test/css/samples/unused-selector-child-combinator/_config.js
index becf382147..603e0d1fd0 100644
--- a/test/css/samples/unused-selector-child-combinator/_config.js
+++ b/test/css/samples/unused-selector-child-combinator/_config.js
@@ -1,7 +1,7 @@
export default {
warnings: [
{
- code: "css-unused-selector",
+ code: 'css-unused-selector',
message: 'Unused CSS selector "article > *"',
frame: `
1: '), true);
diff --git a/test/runtime/samples/raw-mustache-inside-slot/_config.js b/test/runtime/samples/raw-mustache-inside-slot/_config.js
index e42fa7f517..a38c0b1c81 100644
--- a/test/runtime/samples/raw-mustache-inside-slot/_config.js
+++ b/test/runtime/samples/raw-mustache-inside-slot/_config.js
@@ -5,8 +5,8 @@ export default {
This line should be last.
`,
async test({ assert, target, window }) {
- const btn = target.querySelector("button");
- const clickEvent = new window.MouseEvent("click");
+ const btn = target.querySelector('button');
+ const clickEvent = new window.MouseEvent('click');
await btn.dispatchEvent(clickEvent);
diff --git a/test/runtime/samples/raw-mustaches-preserved/_config.js b/test/runtime/samples/raw-mustaches-preserved/_config.js
index 66b829f7cb..d4d57025d2 100644
--- a/test/runtime/samples/raw-mustaches-preserved/_config.js
+++ b/test/runtime/samples/raw-mustaches-preserved/_config.js
@@ -5,13 +5,13 @@ export default {
raw: 'does not change
'
},
- html: ``,
+ html: '',
test({ assert, component, target }) {
const p = target.querySelector('p');
component.raw = 'does not change
';
- assert.equal(target.innerHTML, ``);
+ assert.equal(target.innerHTML, '');
assert.strictEqual(target.querySelector('p'), p);
}
};
diff --git a/test/runtime/samples/raw-mustaches-td-tr/_config.js b/test/runtime/samples/raw-mustaches-td-tr/_config.js
index 1bcad157f3..3b165bb65e 100644
--- a/test/runtime/samples/raw-mustaches-td-tr/_config.js
+++ b/test/runtime/samples/raw-mustaches-td-tr/_config.js
@@ -1,6 +1,6 @@
export default {
props: {
- raw: "1 2 "
+ raw: '1 2 '
},
html: `
diff --git a/test/runtime/samples/raw-mustaches/_config.js b/test/runtime/samples/raw-mustaches/_config.js
index cc9999aa34..9eda8289ce 100644
--- a/test/runtime/samples/raw-mustaches/_config.js
+++ b/test/runtime/samples/raw-mustaches/_config.js
@@ -5,13 +5,13 @@ export default {
raw: 'raw html!!!\\o/ '
},
- html: `beforeraw html!!!\\o/ after`,
+ html: 'beforeraw html!!!\\o/ after',
test({ assert, component, target }) {
component.raw = '';
- assert.equal(target.innerHTML, `beforeafter`);
+ assert.equal(target.innerHTML, 'beforeafter');
component.raw = 'how about unclosed elements?';
- assert.equal(target.innerHTML, `beforehow about unclosed elements? after`);
+ assert.equal(target.innerHTML, 'beforehow about unclosed elements? after');
component.$destroy();
assert.equal(target.innerHTML, '');
}
diff --git a/test/runtime/samples/reactive-assignment-in-assignment-rhs/_config.js b/test/runtime/samples/reactive-assignment-in-assignment-rhs/_config.js
index f0bf2cdc70..cb79802589 100644
--- a/test/runtime/samples/reactive-assignment-in-assignment-rhs/_config.js
+++ b/test/runtime/samples/reactive-assignment-in-assignment-rhs/_config.js
@@ -1,3 +1,3 @@
export default {
- html: `1 1 `
+ html: '1 1 '
};
\ No newline at end of file
diff --git a/test/runtime/samples/reactive-assignment-in-complex-declaration-with-store/_config.js b/test/runtime/samples/reactive-assignment-in-complex-declaration-with-store/_config.js
index e74cea70fe..0086c0060a 100644
--- a/test/runtime/samples/reactive-assignment-in-complex-declaration-with-store/_config.js
+++ b/test/runtime/samples/reactive-assignment-in-complex-declaration-with-store/_config.js
@@ -1,3 +1,3 @@
export default {
- html: `2 2 xxx 5 6 `
+ html: '2 2 xxx 5 6 '
};
\ No newline at end of file
diff --git a/test/runtime/samples/reactive-assignment-in-complex-declaration/_config.js b/test/runtime/samples/reactive-assignment-in-complex-declaration/_config.js
index d17a81e052..a24254044a 100644
--- a/test/runtime/samples/reactive-assignment-in-complex-declaration/_config.js
+++ b/test/runtime/samples/reactive-assignment-in-complex-declaration/_config.js
@@ -1,3 +1,3 @@
export default {
- html: `2 2 `
+ html: '2 2 '
};
\ No newline at end of file
diff --git a/test/runtime/samples/reactive-assignment-in-declaration/_config.js b/test/runtime/samples/reactive-assignment-in-declaration/_config.js
index f0bf2cdc70..cb79802589 100644
--- a/test/runtime/samples/reactive-assignment-in-declaration/_config.js
+++ b/test/runtime/samples/reactive-assignment-in-declaration/_config.js
@@ -1,3 +1,3 @@
export default {
- html: `1 1 `
+ html: '1 1 '
};
\ No newline at end of file
diff --git a/test/runtime/samples/reactive-assignment-in-for-loop-head/_config.js b/test/runtime/samples/reactive-assignment-in-for-loop-head/_config.js
index df64f577df..01dcabe073 100644
--- a/test/runtime/samples/reactive-assignment-in-for-loop-head/_config.js
+++ b/test/runtime/samples/reactive-assignment-in-for-loop-head/_config.js
@@ -1,3 +1,3 @@
export default {
- html: `0 0 `
+ html: '0 0 '
};
\ No newline at end of file
diff --git a/test/runtime/samples/reactive-block-break/_config.js b/test/runtime/samples/reactive-block-break/_config.js
index f2d3e6a8f5..a7fdffaaf1 100644
--- a/test/runtime/samples/reactive-block-break/_config.js
+++ b/test/runtime/samples/reactive-block-break/_config.js
@@ -1,3 +1,3 @@
export default {
- html: `1 2 `
+ html: '1 2 '
};
\ No newline at end of file
diff --git a/test/runtime/samples/reactive-import-statement-2/_config.js b/test/runtime/samples/reactive-import-statement-2/_config.js
index ccc97cd076..fc6d8f008d 100644
--- a/test/runtime/samples/reactive-import-statement-2/_config.js
+++ b/test/runtime/samples/reactive-import-statement-2/_config.js
@@ -1,3 +1,3 @@
export default {
- html: `prop value
`
+ html: 'prop value
'
};
diff --git a/test/runtime/samples/reactive-value-coerce/_config.js b/test/runtime/samples/reactive-value-coerce/_config.js
index 7d8bcb6b50..9cf9d7d8ee 100644
--- a/test/runtime/samples/reactive-value-coerce/_config.js
+++ b/test/runtime/samples/reactive-value-coerce/_config.js
@@ -1,10 +1,10 @@
export default {
- html: `1-1`,
+ html: '1-1',
test: ({ assert, component, target }) => {
component.a.b[0] = 2;
component.a = component.a; // eslint-disable-line no-self-assign
- assert.htmlEqual(target.innerHTML, `2-2`);
+ assert.htmlEqual(target.innerHTML, '2-2');
}
};
diff --git a/test/runtime/samples/reactive-value-function/_config.js b/test/runtime/samples/reactive-value-function/_config.js
index c2de1af713..2a84953576 100644
--- a/test/runtime/samples/reactive-value-function/_config.js
+++ b/test/runtime/samples/reactive-value-function/_config.js
@@ -1,9 +1,9 @@
export default {
- html: `1-2`,
+ html: '1-2',
async test({ assert, component, target }) {
await component.update();
- assert.htmlEqual(target.innerHTML, `3-4`);
+ assert.htmlEqual(target.innerHTML, '3-4');
}
};
diff --git a/test/runtime/samples/reactive-value-mutate/_config.js b/test/runtime/samples/reactive-value-mutate/_config.js
index e408816834..66979f1e31 100644
--- a/test/runtime/samples/reactive-value-mutate/_config.js
+++ b/test/runtime/samples/reactive-value-mutate/_config.js
@@ -1,3 +1,3 @@
export default {
- html: `{"bar":42}`
+ html: '{"bar":42}'
};
diff --git a/test/runtime/samples/semicolon-hoisting/_config.js b/test/runtime/samples/semicolon-hoisting/_config.js
index 88d81cdc9e..7da2831db4 100644
--- a/test/runtime/samples/semicolon-hoisting/_config.js
+++ b/test/runtime/samples/semicolon-hoisting/_config.js
@@ -1,3 +1,3 @@
export default {
- html: ``
+ html: ''
};
\ No newline at end of file
diff --git a/test/runtime/samples/set-undefined-attr/_config.js b/test/runtime/samples/set-undefined-attr/_config.js
index a0df368e65..7082b25c18 100644
--- a/test/runtime/samples/set-undefined-attr/_config.js
+++ b/test/runtime/samples/set-undefined-attr/_config.js
@@ -1,5 +1,5 @@
export default {
- html: `
`,
+ html: '
',
- ssrHtml: `
`
+ ssrHtml: '
'
};
diff --git a/test/runtime/samples/sigil-component-prop/_config.js b/test/runtime/samples/sigil-component-prop/_config.js
index 9f84a59994..105f8b468c 100644
--- a/test/runtime/samples/sigil-component-prop/_config.js
+++ b/test/runtime/samples/sigil-component-prop/_config.js
@@ -3,5 +3,5 @@ export default {
dev: true
},
props: { foo: 'foo' },
- html: `foo @ foo # foo
`
+ html: 'foo @ foo # foo
'
};
diff --git a/test/runtime/samples/sigil-expression-function-body/_config.js b/test/runtime/samples/sigil-expression-function-body/_config.js
index fccd0db2d0..8d88d1fd08 100644
--- a/test/runtime/samples/sigil-expression-function-body/_config.js
+++ b/test/runtime/samples/sigil-expression-function-body/_config.js
@@ -1,3 +1,3 @@
export default {
- html: `@foo`
+ html: '@foo'
};
diff --git a/test/runtime/samples/sigil-static-#/_config.js b/test/runtime/samples/sigil-static-#/_config.js
index 747ddc2a94..2f75f5cda2 100644
--- a/test/runtime/samples/sigil-static-#/_config.js
+++ b/test/runtime/samples/sigil-static-#/_config.js
@@ -1,3 +1,3 @@
export default {
- html: `#foo`
+ html: '#foo'
};
\ No newline at end of file
diff --git a/test/runtime/samples/sigil-static-@/_config.js b/test/runtime/samples/sigil-static-@/_config.js
index ada3a602ab..7155a3d1d0 100644
--- a/test/runtime/samples/sigil-static-@/_config.js
+++ b/test/runtime/samples/sigil-static-@/_config.js
@@ -1,3 +1,3 @@
export default {
- html: `@foo`
+ html: '@foo'
};
\ No newline at end of file
diff --git a/test/runtime/samples/slot-if-block-update-no-anchor/_config.js b/test/runtime/samples/slot-if-block-update-no-anchor/_config.js
index 58d2b49ade..f05d79c265 100644
--- a/test/runtime/samples/slot-if-block-update-no-anchor/_config.js
+++ b/test/runtime/samples/slot-if-block-update-no-anchor/_config.js
@@ -1,7 +1,7 @@
export default {
test({ assert, target, component }) {
- assert.htmlEqual(target.innerHTML, ` `);
+ assert.htmlEqual(target.innerHTML, ' ');
component.enabled = true;
- assert.htmlEqual(target.innerHTML, `enabled `);
+ assert.htmlEqual(target.innerHTML, 'enabled ');
}
};
diff --git a/test/runtime/samples/spread-component-dynamic-undefined/_config.js b/test/runtime/samples/spread-component-dynamic-undefined/_config.js
index e7e205a34b..ba41df3e54 100644
--- a/test/runtime/samples/spread-component-dynamic-undefined/_config.js
+++ b/test/runtime/samples/spread-component-dynamic-undefined/_config.js
@@ -5,13 +5,13 @@ export default {
}
},
- html: ``,
+ html: '',
test({ assert, component, target }) {
component.props = {
a: 2
};
- assert.htmlEqual(target.innerHTML, ``);
+ assert.htmlEqual(target.innerHTML, '');
}
};
diff --git a/test/runtime/samples/spread-component-dynamic/_config.js b/test/runtime/samples/spread-component-dynamic/_config.js
index 08df27e1c2..7992a30514 100644
--- a/test/runtime/samples/spread-component-dynamic/_config.js
+++ b/test/runtime/samples/spread-component-dynamic/_config.js
@@ -14,6 +14,6 @@ export default {
a: 2
};
- assert.htmlEqual(target.innerHTML, `a: 2
`);
+ assert.htmlEqual(target.innerHTML, 'a: 2
');
}
};
diff --git a/test/runtime/samples/spread-component-multiple-dependencies/_config.js b/test/runtime/samples/spread-component-multiple-dependencies/_config.js
index 070916ebd8..ee2c0feda8 100644
--- a/test/runtime/samples/spread-component-multiple-dependencies/_config.js
+++ b/test/runtime/samples/spread-component-multiple-dependencies/_config.js
@@ -1,10 +1,10 @@
export default {
- html: `b baz`,
+ html: 'b baz',
test({ assert, component, target }) {
component.foo = true;
assert.htmlEqual(
target.innerHTML,
- `a baz`
+ 'a baz'
);
}
};
diff --git a/test/runtime/samples/spread-element-boolean/_config.js b/test/runtime/samples/spread-element-boolean/_config.js
index d336dae029..3ceeb3f677 100644
--- a/test/runtime/samples/spread-element-boolean/_config.js
+++ b/test/runtime/samples/spread-element-boolean/_config.js
@@ -18,7 +18,7 @@ export default {
assert.htmlEqual(
target.innerHTML,
- `click me `
+ 'click me '
);
assert.ok(!button.disabled);
}
diff --git a/test/runtime/samples/spread-element-class/_config.js b/test/runtime/samples/spread-element-class/_config.js
index 7fc3d49012..393f3199b7 100644
--- a/test/runtime/samples/spread-element-class/_config.js
+++ b/test/runtime/samples/spread-element-class/_config.js
@@ -1,7 +1,7 @@
export default {
- html: `hello
`,
+ html: 'hello
',
test({ assert, component, target }) {
component.blah = 'goodbye';
- assert.htmlEqual(target.innerHTML, `goodbye
`);
+ assert.htmlEqual(target.innerHTML, 'goodbye
');
}
};
diff --git a/test/runtime/samples/spread-element-input-bind-group-with-value-attr/_config.js b/test/runtime/samples/spread-element-input-bind-group-with-value-attr/_config.js
index 6e1b890351..4bbc9d278c 100644
--- a/test/runtime/samples/spread-element-input-bind-group-with-value-attr/_config.js
+++ b/test/runtime/samples/spread-element-input-bind-group-with-value-attr/_config.js
@@ -5,7 +5,7 @@ export default {
}
},
- html: ` `,
+ html: ' ',
async test({ assert, component, target, window }) {
const input = target.querySelector('input');
diff --git a/test/runtime/samples/spread-element-input-value-undefined/_config.js b/test/runtime/samples/spread-element-input-value-undefined/_config.js
index d66e215cde..9a83dccd80 100644
--- a/test/runtime/samples/spread-element-input-value-undefined/_config.js
+++ b/test/runtime/samples/spread-element-input-value-undefined/_config.js
@@ -1,12 +1,12 @@
export default {
async test({ assert, component, target, window }) {
- const input = target.querySelector("input");
+ const input = target.querySelector('input');
component.value = undefined;
- assert.equal(input.value, "undefined");
+ assert.equal(input.value, 'undefined');
- component.value = "foobar";
+ component.value = 'foobar';
- assert.equal(input.value, "foobar");
+ assert.equal(input.value, 'foobar');
}
};
diff --git a/test/runtime/samples/spread-element-input-value/_config.js b/test/runtime/samples/spread-element-input-value/_config.js
index abb63ceab3..0df088159a 100644
--- a/test/runtime/samples/spread-element-input-value/_config.js
+++ b/test/runtime/samples/spread-element-input-value/_config.js
@@ -1,6 +1,6 @@
export default {
async test({ assert, component, target, window }) {
- const [input1, input2] = target.querySelectorAll("input");
+ const [input1, input2] = target.querySelectorAll('input');
// we are not able emulate user interaction in jsdom,
// therefore, jsdom could not validate minlength / maxlength
@@ -14,7 +14,7 @@ export default {
const spy1 = spyOnValueSetter(input1, input1.value);
const spy2 = spyOnValueSetter(input2, input2.value);
- const event = new window.Event("input");
+ const event = new window.Event('input');
input1.value = '12345';
spy1.reset();
@@ -41,7 +41,7 @@ export default {
function spyOnValueSetter(input, initialValue) {
let value = initialValue;
let isSet = false;
- Object.defineProperty(input, "value", {
+ Object.defineProperty(input, 'value', {
get() {
return value;
},
diff --git a/test/runtime/samples/spread-element-input/_config.js b/test/runtime/samples/spread-element-input/_config.js
index 80685b9d20..2e68e9832f 100644
--- a/test/runtime/samples/spread-element-input/_config.js
+++ b/test/runtime/samples/spread-element-input/_config.js
@@ -5,5 +5,5 @@ export default {
}
},
- html: ` `
+ html: ' '
};
diff --git a/test/runtime/samples/spread-element-multiple-dependencies/_config.js b/test/runtime/samples/spread-element-multiple-dependencies/_config.js
index 480eb6621c..5802b4403d 100644
--- a/test/runtime/samples/spread-element-multiple-dependencies/_config.js
+++ b/test/runtime/samples/spread-element-multiple-dependencies/_config.js
@@ -1,10 +1,10 @@
export default {
- html: `
`,
+ html: '
',
test({ assert, component, target }) {
component.foo = true;
assert.htmlEqual(
target.innerHTML,
- `
`
+ '
'
);
}
};
diff --git a/test/runtime/samples/spread-element-multiple/_config.js b/test/runtime/samples/spread-element-multiple/_config.js
index 0c04b16d40..38afe2fe8e 100644
--- a/test/runtime/samples/spread-element-multiple/_config.js
+++ b/test/runtime/samples/spread-element-multiple/_config.js
@@ -25,7 +25,7 @@ export default {
assert.htmlEqual(
target.innerHTML,
- `test
`
+ 'test
'
);
}
};
diff --git a/test/runtime/samples/spread-element-readonly/_config.js b/test/runtime/samples/spread-element-readonly/_config.js
index 1d349fd76f..5e33acb0aa 100644
--- a/test/runtime/samples/spread-element-readonly/_config.js
+++ b/test/runtime/samples/spread-element-readonly/_config.js
@@ -1,6 +1,6 @@
export default {
skip_if_ssr: true, // DOM and SSR output is different, a separate SSR test exists
- html: ` `,
+ html: ' ',
test({ assert, target }) {
const div = target.querySelector('input');
diff --git a/test/runtime/samples/spread-element-removal/_config.js b/test/runtime/samples/spread-element-removal/_config.js
index 270804170d..1fd2443369 100644
--- a/test/runtime/samples/spread-element-removal/_config.js
+++ b/test/runtime/samples/spread-element-removal/_config.js
@@ -1,3 +1,3 @@
export default {
- html: ` `
+ html: ' '
};
diff --git a/test/runtime/samples/spread-element/_config.js b/test/runtime/samples/spread-element/_config.js
index 0763634b0f..2332891b67 100644
--- a/test/runtime/samples/spread-element/_config.js
+++ b/test/runtime/samples/spread-element/_config.js
@@ -1,5 +1,5 @@
export default {
- html: `red
`,
+ html: 'red
',
test({ assert, component, target }) {
const div = target.querySelector( 'div' );
@@ -9,13 +9,13 @@ export default {
component.color = 'blue';
component.props = { 'data-foo': 'baz', 'data-named': 'qux' };
- assert.htmlEqual( target.innerHTML, `blue
` );
+ assert.htmlEqual( target.innerHTML, 'blue
' );
assert.equal( div.dataset.foo, 'baz' );
assert.equal( div.dataset.named, 'value' );
component.color = 'blue';
component.props = {};
- assert.htmlEqual( target.innerHTML, `blue
` );
+ assert.htmlEqual( target.innerHTML, 'blue
' );
assert.equal( div.dataset.foo, undefined );
}
};
diff --git a/test/runtime/samples/spring/_config.js b/test/runtime/samples/spring/_config.js
index 49367ce08b..5fd33b2e51 100644
--- a/test/runtime/samples/spring/_config.js
+++ b/test/runtime/samples/spring/_config.js
@@ -1,3 +1,3 @@
export default {
- html: `0
`
+ html: '0
'
};
diff --git a/test/runtime/samples/store-contextual/_config.js b/test/runtime/samples/store-contextual/_config.js
index e06332a233..5600f9a661 100644
--- a/test/runtime/samples/store-contextual/_config.js
+++ b/test/runtime/samples/store-contextual/_config.js
@@ -7,7 +7,7 @@ const todos = [
];
export default {
- error: `Stores must be declared at the top level of the component (this may change in a future version of Svelte)`,
+ error: 'Stores must be declared at the top level of the component (this may change in a future version of Svelte)',
props: {
todos
diff --git a/test/runtime/samples/store-dev-mode-error/_config.js b/test/runtime/samples/store-dev-mode-error/_config.js
index 70b24337fd..3efcc9068c 100644
--- a/test/runtime/samples/store-dev-mode-error/_config.js
+++ b/test/runtime/samples/store-dev-mode-error/_config.js
@@ -7,5 +7,5 @@ export default {
count: 0
},
- error: `'count' is not a store with a 'subscribe' method`
+ error: '\'count\' is not a store with a \'subscribe\' method'
};
\ No newline at end of file
diff --git a/test/runtime/samples/store-imported-module-b/_config.js b/test/runtime/samples/store-imported-module-b/_config.js
index 8f75dcc493..7c503c3905 100644
--- a/test/runtime/samples/store-imported-module-b/_config.js
+++ b/test/runtime/samples/store-imported-module-b/_config.js
@@ -1,3 +1,3 @@
export default {
- error: `Cannot reference store value inside