Fix lint warnings (#5263)

pull/5280/head
Antony Jones 5 years ago committed by GitHub
parent 1d9e2a13f2
commit 82dc26a31c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

4
package-lock.json generated

@ -144,8 +144,8 @@
} }
}, },
"@sveltejs/eslint-config": { "@sveltejs/eslint-config": {
"version": "github:sveltejs/eslint-config#e8a9b27cd3f7aa66388474412b1a5c11c5a44ade", "version": "github:sveltejs/eslint-config#848ce6464a9ae9c2f3a3095474701dfe9ab851df",
"from": "github:sveltejs/eslint-config#v0.0.1", "from": "github:sveltejs/eslint-config#v5.0.0",
"dev": true "dev": true
}, },
"@tootallnate/once": { "@tootallnate/once": {

@ -63,7 +63,7 @@
"@rollup/plugin-sucrase": "^3.0.0", "@rollup/plugin-sucrase": "^3.0.0",
"@rollup/plugin-typescript": "^2.0.1", "@rollup/plugin-typescript": "^2.0.1",
"@rollup/plugin-virtual": "^2.0.0", "@rollup/plugin-virtual": "^2.0.0",
"@sveltejs/eslint-config": "github:sveltejs/eslint-config#v0.0.1", "@sveltejs/eslint-config": "github:sveltejs/eslint-config#v5.0.0",
"@types/mocha": "^5.2.7", "@types/mocha": "^5.2.7",
"@types/node": "^8.10.53", "@types/node": "^8.10.53",
"@typescript-eslint/eslint-plugin": "^3.0.2", "@typescript-eslint/eslint-plugin": "^3.0.2",

@ -8,7 +8,7 @@ import {
create_scopes, create_scopes,
extract_names, extract_names,
Scope, Scope,
extract_identifiers, extract_identifiers
} from './utils/scope'; } from './utils/scope';
import Stylesheet from './css/Stylesheet'; import Stylesheet from './css/Stylesheet';
import { test } from '../config'; import { test } from '../config';
@ -155,7 +155,7 @@ export default class Component {
) || { start: 0, end: 0 }; ) || { start: 0, end: 0 };
this.warn(svelteOptions, { this.warn(svelteOptions, {
code: 'custom-element-no-tag', code: 'custom-element-no-tag',
message: `No custom element 'tag' option was specified. To automatically register a custom element, specify a name with a hyphen in it, e.g. <svelte:options tag="my-thing"/>. To hide this warning, use <svelte:options tag={null}/>`, message: `No custom element 'tag' option was specified. To automatically register a custom element, specify a name with a hyphen in it, e.g. <svelte:options tag="my-thing"/>. To hide this warning, use <svelte:options tag={null}/>`
}); });
} }
this.tag = this.component_options.tag || compile_options.tag; this.tag = this.component_options.tag || compile_options.tag;
@ -190,7 +190,7 @@ export default class Component {
this.add_var({ this.add_var({
name, name,
injected: true, injected: true,
referenced: true, referenced: true
}); });
} else if (name[0] === '$') { } else if (name[0] === '$') {
this.add_var({ this.add_var({
@ -198,7 +198,7 @@ export default class Component {
injected: true, injected: true,
referenced: true, referenced: true,
mutated: true, mutated: true,
writable: true, writable: true
}); });
const subscribable_name = name.slice(1); const subscribable_name = name.slice(1);
@ -289,7 +289,7 @@ export default class Component {
} }
const imported_helpers = Array.from(this.helpers, ([name, alias]) => ({ const imported_helpers = Array.from(this.helpers, ([name, alias]) => ({
name, name,
alias, alias
})); }));
create_module( create_module(
@ -305,7 +305,7 @@ export default class Component {
.filter(variable => variable.module && variable.export_name) .filter(variable => variable.module && variable.export_name)
.map(variable => ({ .map(variable => ({
name: variable.name, name: variable.name,
as: variable.export_name, as: variable.export_name
})) }))
); );
@ -342,9 +342,9 @@ export default class Component {
reassigned: v.reassigned || false, reassigned: v.reassigned || false,
referenced: v.referenced || false, referenced: v.referenced || false,
writable: v.writable || false, writable: v.writable || false,
referenced_from_script: v.referenced_from_script || false, referenced_from_script: v.referenced_from_script || false
})), })),
stats: this.stats.render(), stats: this.stats.render()
}; };
} }
@ -409,7 +409,7 @@ export default class Component {
source: this.source, source: this.source,
start: pos.start, start: pos.start,
end: pos.end, end: pos.end,
filename: this.compile_options.filename, filename: this.compile_options.filename
}); });
} }
@ -441,7 +441,7 @@ export default class Component {
pos: pos.start, pos: pos.start,
filename: this.compile_options.filename, filename: this.compile_options.filename,
toString: () => toString: () =>
`${warning.message} (${start.line}:${start.column})\n${frame}`, `${warning.message} (${start.line}:${start.column})\n${frame}`
}); });
} }
@ -453,7 +453,7 @@ export default class Component {
if (node.type === 'ExportDefaultDeclaration') { if (node.type === 'ExportDefaultDeclaration') {
this.error(node, { this.error(node, {
code: `default-export`, code: `default-export`,
message: `A component cannot have a default export`, message: `A component cannot have a default export`
}); });
} }
@ -461,7 +461,7 @@ export default class Component {
if (node.source) { if (node.source) {
this.error(node, { this.error(node, {
code: `not-implemented`, code: `not-implemented`,
message: `A component currently cannot have an export ... from`, message: `A component currently cannot have an export ... from`
}); });
} }
if (node.declaration) { if (node.declaration) {
@ -531,10 +531,10 @@ export default class Component {
if (node.type === 'LabeledStatement' && node.label.name === '$') { if (node.type === 'LabeledStatement' && node.label.name === '$') {
component.warn(node as any, { component.warn(node as any, {
code: 'module-script-reactive-declaration', code: 'module-script-reactive-declaration',
message: '$: has no effect in a module script', message: '$: has no effect in a module script'
}); });
} }
}, }
}); });
const { scope, globals } = create_scopes(script.content); const { scope, globals } = create_scopes(script.content);
@ -544,7 +544,7 @@ export default class Component {
if (name[0] === '$') { if (name[0] === '$') {
this.error(node as any, { this.error(node as any, {
code: 'illegal-declaration', 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] === '$') { if (name[0] === '$') {
this.error(node as any, { this.error(node as any, {
code: 'illegal-subscription', code: 'illegal-subscription',
message: `Cannot reference store value inside <script context="module">`, message: `Cannot reference store value inside <script context="module">`
}); });
} else { } else {
this.add_var({ this.add_var({
@ -623,7 +623,7 @@ export default class Component {
if (name[0] === '$') { if (name[0] === '$') {
this.error(node as any, { this.error(node as any, {
code: 'illegal-declaration', 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`
}); });
} }
@ -647,12 +647,12 @@ export default class Component {
injected: true, injected: true,
writable: true, writable: true,
reassigned: true, reassigned: true,
initialised: true, initialised: true
}); });
} else if (is_reserved_keyword(name)) { } else if (is_reserved_keyword(name)) {
this.add_var({ this.add_var({
name, name,
injected: true, injected: true
}); });
} else if (name[0] === '$') { } else if (name[0] === '$') {
if (name === '$' || name[1] === '$') { if (name === '$' || name[1] === '$') {
@ -666,7 +666,7 @@ export default class Component {
name, name,
injected: true, injected: true,
mutated: true, mutated: true,
writable: true, writable: true
}); });
this.add_reference(name.slice(1)); this.add_reference(name.slice(1));
@ -764,7 +764,7 @@ export default class Component {
if (map.has(node)) { if (map.has(node)) {
scope = scope.parent; scope = scope.parent;
} }
}, }
}); });
for (const [parent, prop, index] of to_remove) { for (const [parent, prop, index] of to_remove) {
@ -832,7 +832,7 @@ export default class Component {
if (map.has(node)) { if (map.has(node)) {
scope = scope.parent; scope = scope.parent;
} }
}, }
}); });
} }
@ -844,7 +844,7 @@ export default class Component {
) { ) {
this.warn(node as any, { this.warn(node as any, {
code: 'non-top-level-reactive-declaration', code: 'non-top-level-reactive-declaration',
message: '$: has no effect outside of the top-level', message: '$: has no effect outside of the top-level'
}); });
} }
@ -881,7 +881,7 @@ export default class Component {
if (node.body.type !== 'BlockStatement') { if (node.body.type !== 'BlockStatement') {
node.body = { node.body = {
type: 'BlockStatement', type: 'BlockStatement',
body: [node.body], body: [node.body]
}; };
} }
node.body.body.push(inside[0]); node.body.body.push(inside[0]);
@ -890,8 +890,8 @@ export default class Component {
type: 'BlockStatement', type: 'BlockStatement',
body: [ body: [
before[0], before[0],
node, node
], ]
}; };
} }
return null; return null;
@ -927,7 +927,7 @@ export default class Component {
// TODO is this still true post-#3539? // TODO is this still true post-#3539?
component.error(declarator as any, { component.error(declarator as any, {
code: 'destructured-prop', code: 'destructured-prop',
message: `Cannot declare props in destructured declaration`, message: `Cannot declare props in destructured declaration`
}); });
} }
@ -990,7 +990,7 @@ export default class Component {
if (node.type === 'ExportNamedDeclaration' && node.declaration) { if (node.type === 'ExportNamedDeclaration' && node.declaration) {
(parent as Program).body[index] = node.declaration; (parent as Program).body[index] = node.declaration;
} }
}, }
}); });
} }
@ -1004,7 +1004,7 @@ export default class Component {
hoistable_nodes, hoistable_nodes,
var_lookup, var_lookup,
injected_reactive_declaration_vars, injected_reactive_declaration_vars,
imports, imports
} = this; } = this;
const top_level_function_declarations = new Map(); const top_level_function_declarations = new Map();
@ -1136,7 +1136,7 @@ export default class Component {
if (map.has(node)) { if (map.has(node)) {
scope = scope.parent; scope = scope.parent;
} }
}, }
}); });
checked.add(fn_declaration); checked.add(fn_declaration);
@ -1229,7 +1229,7 @@ export default class Component {
if (map.has(node)) { if (map.has(node)) {
scope = scope.parent; scope = scope.parent;
} }
}, }
}); });
const { expression } = node.body as ExpressionStatement; const { expression } = node.body as ExpressionStatement;
@ -1239,7 +1239,7 @@ export default class Component {
assignees, assignees,
dependencies, dependencies,
node, node,
declaration, declaration
}); });
} }
}); });
@ -1320,7 +1320,7 @@ export default class Component {
this.warn(node, { this.warn(node, {
code: 'missing-declaration', code: 'missing-declaration',
message, message
}); });
} }
@ -1343,7 +1343,7 @@ function process_component_options(component: Component, nodes) {
'accessors' in component.compile_options 'accessors' in component.compile_options
? component.compile_options.accessors ? component.compile_options.accessors
: !!component.compile_options.customElement, : !!component.compile_options.customElement,
preserveWhitespace: !!component.compile_options.preserveWhitespace, preserveWhitespace: !!component.compile_options.preserveWhitespace
}; };
const node = nodes.find(node => node.name === 'svelte:options'); const node = nodes.find(node => node.name === 'svelte:options');
@ -1384,7 +1384,7 @@ function process_component_options(component: Component, nodes) {
if (tag && !/^[a-zA-Z][a-zA-Z0-9]*-[a-zA-Z0-9-]+$/.test(tag)) { if (tag && !/^[a-zA-Z][a-zA-Z0-9]*-[a-zA-Z0-9-]+$/.test(tag)) {
component.error(attribute, { component.error(attribute, {
code: `invalid-tag-property`, code: `invalid-tag-property`,
message: `tag name must be two or more words joined by the '-' character`, message: `tag name must be two or more words joined by the '-' character`
}); });
} }
@ -1412,12 +1412,12 @@ function process_component_options(component: Component, nodes) {
if (match) { if (match) {
component.error(attribute, { component.error(attribute, {
code: `invalid-namespace-property`, code: `invalid-namespace-property`,
message: `Invalid namespace '${ns}' (did you mean '${match}'?)`, message: `Invalid namespace '${ns}' (did you mean '${match}'?)`
}); });
} else { } else {
component.error(attribute, { component.error(attribute, {
code: `invalid-namespace-property`, code: `invalid-namespace-property`,
message: `Invalid namespace '${ns}'`, message: `Invalid namespace '${ns}'`
}); });
} }
} }
@ -1443,13 +1443,13 @@ function process_component_options(component: Component, nodes) {
default: default:
component.error(attribute, { component.error(attribute, {
code: `invalid-options-attribute`, code: `invalid-options-attribute`,
message: `<svelte:options> unknown attribute`, message: `<svelte:options> unknown attribute`
}); });
} }
} else { } else {
component.error(attribute, { component.error(attribute, {
code: `invalid-options-attribute`, code: `invalid-options-attribute`,
message: `<svelte:options> can only have static 'tag', 'namespace', 'accessors', 'immutable' and 'preserveWhitespace' attributes`, message: `<svelte:options> can only have static 'tag', 'namespace', 'accessors', 'immutable' and 'preserveWhitespace' attributes`
}); });
} }
}); });

@ -52,7 +52,7 @@ function validate_options(options: CompileOptions, warnings: Warning[]) {
code: `options-lowercase-name`, code: `options-lowercase-name`,
message, message,
filename, filename,
toString: () => message, toString: () => message
}); });
} }
@ -62,7 +62,7 @@ function validate_options(options: CompileOptions, warnings: Warning[]) {
code: `options-loop-guard-timeout`, code: `options-loop-guard-timeout`,
message, message,
filename, filename,
toString: () => message, toString: () => message
}); });
} }
} }

@ -76,7 +76,7 @@ export default class Binding extends Node {
if (info.expression.type === 'Identifier' && !variable.writable) component.error(this.expression.node, { if (info.expression.type === 'Identifier' && !variable.writable) component.error(this.expression.node, {
code: 'invalid-binding', code: 'invalid-binding',
message: 'Cannot bind to a variable which is not writable', message: 'Cannot bind to a variable which is not writable'
}); });
} }

@ -399,7 +399,7 @@ export default class Element extends Node {
if (/(^[0-9-.])|[\^$@%&#?!|()[\]{}^*+~;]/.test(name)) { if (/(^[0-9-.])|[\^$@%&#?!|()[\]{}^*+~;]/.test(name)) {
component.error(attribute, { component.error(attribute, {
code: `illegal-attribute`, code: `illegal-attribute`,
message: `'${name}' is not a valid attribute name`, message: `'${name}' is not a valid attribute name`
}); });
} }
@ -423,7 +423,7 @@ export default class Element extends Node {
if (!(parent.type === 'InlineComponent' || within_custom_element(parent))) { if (!(parent.type === 'InlineComponent' || within_custom_element(parent))) {
component.error(attribute, { component.error(attribute, {
code: `invalid-slotted-content`, code: `invalid-slotted-content`,
message: `Element with a slot='...' attribute must be a child of a component or a descendant of a custom element`, message: `Element with a slot='...' attribute must be a child of a component or a descendant of a custom element`
}); });
} }
} }

@ -12,7 +12,7 @@ const elements_without_text = new Set([
'dl', 'dl',
'optgroup', 'optgroup',
'select', 'select',
'video', 'video'
]); ]);
export default class Text extends Node { export default class Text extends Node {

@ -106,7 +106,7 @@ export default class Block {
intro: [], intro: [],
update: [], update: [],
outro: [], outro: [],
destroy: [], destroy: []
}; };
this.has_animation = false; this.has_animation = false;

@ -76,7 +76,7 @@ export default class Renderer {
bindings: new Map(), bindings: new Map(),
dependencies: new Set(), dependencies: new Set()
}); });
this.block.has_update_method = true; this.block.has_update_method = true;

@ -307,8 +307,8 @@ const attribute_lookup = {
'optgroup', 'optgroup',
'option', 'option',
'select', 'select',
'textarea', 'textarea'
], ]
}, },
formnovalidate: { property_name: 'formNoValidate', applies_to: ['button', 'input'] }, formnovalidate: { property_name: 'formNoValidate', applies_to: ['button', 'input'] },
hidden: {}, hidden: {},
@ -335,9 +335,9 @@ const attribute_lookup = {
'progress', 'progress',
'param', 'param',
'select', 'select',
'textarea', 'textarea'
], ]
}, }
}; };
Object.keys(attribute_lookup).forEach(name => { Object.keys(attribute_lookup).forEach(name => {

@ -302,7 +302,7 @@ function get_binding_group(renderer: Renderer, value: Binding, block: Block) {
}, },
is_context: contexts.length > 0, is_context: contexts.length > 0,
contexts, contexts,
index, index
}); });
} }
@ -355,7 +355,7 @@ function get_event_handler(
uses_context: binding.node.is_contextual || binding.node.expression.uses_context, // TODO this is messy uses_context: binding.node.is_contextual || binding.node.expression.uses_context, // TODO this is messy
mutation, mutation,
contextual_dependencies, contextual_dependencies,
lhs, lhs
}; };
} }

@ -132,7 +132,7 @@ const events = [
event_names: ['toggle'], event_names: ['toggle'],
filter: (node: Element, _name: string) => filter: (node: Element, _name: string) =>
node.name === 'details' node.name === 'details'
}, }
]; ];
export default class ElementWrapper extends Wrapper { export default class ElementWrapper extends Wrapper {

@ -603,7 +603,7 @@ export default class IfBlockWrapper extends Wrapper {
// as -1 // as -1
operator: val.operator, operator: val.operator,
prefix: val.prefix, prefix: val.prefix,
argument: val.argument, argument: val.argument
}; };
} }
} }

@ -112,7 +112,7 @@ export default class InlineComponentWrapper extends Wrapper {
if (variable.reassigned || variable.export_name || variable.is_reactive_dependency) { if (variable.reassigned || variable.export_name || variable.is_reactive_dependency) {
this.renderer.component.warn(this.node, { this.renderer.component.warn(this.node, {
code: 'reactive-component', code: 'reactive-component',
message: `<${name}/> will not be reactive if ${name} changes. Use <svelte:component this={${name}}/> if you want this reactivity.`, message: `<${name}/> will not be reactive if ${name} changes. Use <svelte:component this={${name}}/> if you want this reactivity.`
}); });
} }
} }

@ -16,7 +16,7 @@ const associated_events = {
outerHeight: 'resize', outerHeight: 'resize',
scrollX: 'scroll', scrollX: 'scroll',
scrollY: 'scroll', scrollY: 'scroll'
}; };
const properties = { const properties = {
@ -29,7 +29,7 @@ const readonly = new Set([
'innerHeight', 'innerHeight',
'outerWidth', 'outerWidth',
'outerHeight', 'outerHeight',
'online', 'online'
]); ]);
export default class WindowWrapper extends Wrapper { export default class WindowWrapper extends Wrapper {

@ -34,13 +34,13 @@ export function get_slot_definition(block: Block, scope: TemplateScope, lets: Le
type: 'Property', type: 'Property',
kind: 'init', kind: 'init',
key: l.name, key: l.name,
value, value
}); });
}); });
const changes_input = { const changes_input = {
type: 'ObjectPattern', type: 'ObjectPattern',
properties, properties
}; };
const names: Set<string> = new Set(); const names: Set<string> = new Set();

@ -4,13 +4,13 @@ export function string_to_member_expression(name: string) {
const parts = name.split("."); const parts = name.split(".");
let node: MemberExpression | Identifier = { let node: MemberExpression | Identifier = {
type: "Identifier", type: "Identifier",
name: parts[0], name: parts[0]
}; };
for (let i = 1; i < parts.length; i++) { for (let i = 1; i < parts.length; i++) {
node = { node = {
type: "MemberExpression", type: "MemberExpression",
object: node, object: node,
property: { type: "Identifier", name: parts[i] }, property: { type: "Identifier", name: parts[i] }
} as MemberExpression; } as MemberExpression;
} }
return node; return node;

@ -16,7 +16,7 @@ const escaped = {
"'": '&#39;', "'": '&#39;',
'&': '&amp;', '&': '&amp;',
'<': '&lt;', '<': '&lt;',
'>': '&gt;', '>': '&gt;'
}; };
export function escape_html(html) { export function escape_html(html) {

@ -41,7 +41,7 @@ export class Parser {
start: null, start: null,
end: null, end: null,
type: 'Fragment', type: 'Fragment',
children: [], children: []
}; };
this.stack.push(this.html); this.stack.push(this.html);

@ -57,6 +57,6 @@ export default function read_script(parser: Parser, start: number, attributes: N
start, start,
end: parser.index, end: parser.index,
context: get_context(parser, attributes, start), context: get_context(parser, attributes, start),
content: ast, content: ast
}; };
} }

@ -14,7 +14,7 @@ export default function read_style(parser: Parser, start: number, attributes: No
try { try {
ast = parse(styles, { ast = parse(styles, {
positions: true, positions: true,
offset: content_start, offset: content_start
}); });
} catch (err) { } catch (err) {
if (err.name === 'CssSyntaxError') { if (err.name === 'CssSyntaxError') {

@ -134,9 +134,9 @@ export default function mustache(parser: Parser) {
type: 'IfBlock', type: 'IfBlock',
elseif: true, elseif: true,
expression, expression,
children: [], children: []
}, }
], ]
}; };
parser.stack.push(block.else.children[0]); parser.stack.push(block.else.children[0]);
@ -161,7 +161,7 @@ export default function mustache(parser: Parser) {
start: parser.index, start: parser.index,
end: null, end: null,
type: 'ElseBlock', type: 'ElseBlock',
children: [], children: []
}; };
parser.stack.push(block.else); parser.stack.push(block.else);
@ -260,14 +260,14 @@ export default function mustache(parser: Parser) {
type: 'CatchBlock', type: 'CatchBlock',
children: [], children: [],
skip: true skip: true
}, }
} : } :
{ {
start, start,
end: null, end: null,
type, type,
expression, expression,
children: [], children: []
}; };
parser.allow_whitespace(); parser.allow_whitespace();
@ -350,7 +350,7 @@ export default function mustache(parser: Parser) {
start, start,
end: parser.index, end: parser.index,
type: 'RawMustacheTag', type: 'RawMustacheTag',
expression, expression
}); });
} else if (parser.eat('@debug')) { } else if (parser.eat('@debug')) {
let identifiers; let identifiers;
@ -394,7 +394,7 @@ export default function mustache(parser: Parser) {
start, start,
end: parser.index, end: parser.index,
type: 'MustacheTag', type: 'MustacheTag',
expression, expression
}); });
} }
} }

@ -25,16 +25,16 @@ const specials = new Map([
'script', 'script',
{ {
read: read_script, read: read_script,
property: 'js', property: 'js'
}, }
], ],
[ [
'style', 'style',
{ {
read: read_style, read: read_style,
property: 'css', property: 'css'
}, }
], ]
]); ]);
const SELF = /^svelte:self(?=[\s/>])/; const SELF = /^svelte:self(?=[\s/>])/;
@ -63,7 +63,7 @@ export default function tag(parser: Parser) {
start, start,
end: parser.index, end: parser.index,
type: 'Comment', type: 'Comment',
data, data
}); });
return; return;
@ -116,7 +116,7 @@ export default function tag(parser: Parser) {
type, type,
name, name,
attributes: [], attributes: [],
children: [], children: []
}; };
parser.allow_whitespace(); parser.allow_whitespace();
@ -163,7 +163,7 @@ export default function tag(parser: Parser) {
parser.last_auto_closed_tag = { parser.last_auto_closed_tag = {
tag: parent.name, tag: parent.name,
reason: name, reason: name,
depth: parser.stack.length, depth: parser.stack.length
}; };
} }
@ -437,7 +437,7 @@ function read_attribute(parser: Parser, unique_names: Set<string>) {
end, end,
type: 'Attribute', type: 'Attribute',
name, name,
value, value
}; };
} }
@ -504,7 +504,7 @@ function read_sequence(parser: Parser, done: () => boolean): TemplateNode[] {
start: index, start: index,
end: parser.index, end: parser.index,
type: 'MustacheTag', type: 'MustacheTag',
expression, expression
}); });
current_chunk = { current_chunk = {

@ -19,7 +19,7 @@ export default function text(parser: Parser) {
end: parser.index, end: parser.index,
type: 'Text', type: 'Text',
raw: data, raw: data,
data: decode_character_references(data), data: decode_character_references(data)
}; };
parser.current().children.push(node); parser.current().children.push(node);

@ -2030,5 +2030,5 @@ export default {
sc: 8827, sc: 8827,
wp: 8472, wp: 8472,
wr: 8768, wr: 8768,
xi: 958, xi: 958
}; };

@ -32,7 +32,7 @@ const windows_1252 = [
339, 339,
157, 157,
382, 382,
376, 376
]; ];
const entity_pattern = new RegExp( const entity_pattern = new RegExp(
@ -124,7 +124,7 @@ const disallowed_contents = new Map([
'address article aside blockquote div dl fieldset footer form h1 h2 h3 h4 h5 h6 header hgroup hr main menu nav ol p pre section table ul'.split( 'address article aside blockquote div dl fieldset footer form h1 h2 h3 h4 h5 h6 header hgroup hr main menu nav ol p pre section table ul'.split(
' ' ' '
) )
), )
], ],
['rt', new Set(['rt', 'rp'])], ['rt', new Set(['rt', 'rp'])],
['rp', new Set(['rt', 'rp'])], ['rp', new Set(['rt', 'rp'])],
@ -135,7 +135,7 @@ const disallowed_contents = new Map([
['tfoot', new Set(['tbody'])], ['tfoot', new Set(['tbody'])],
['tr', new Set(['tr', 'tbody'])], ['tr', new Set(['tr', 'tbody'])],
['td', new Set(['td', 'th', 'tr'])], ['td', new Set(['td', 'th', 'tr'])],
['th', new Set(['td', 'th', 'tr'])], ['th', new Set(['td', 'th', 'tr'])]
]); ]);
// can this be a child of the parent element, or does it implicitly // can this be a child of the parent element, or does it implicitly

@ -49,7 +49,7 @@ async function replace_async(str: string, re: RegExp, func: (...any) => Promise<
({ ({
offset: args[args.length - 2], offset: args[args.length - 2],
length: args[0].length, length: args[0].length,
replacement: res, replacement: res
}) as Replacement }) as Replacement
) )
); );

@ -206,7 +206,7 @@ class FuzzySet {
match_score = matches[match_index]; match_score = matches[match_index];
results.push([ results.push([
match_score / (vector_normal * items[match_index][0]), match_score / (vector_normal * items[match_index][0]),
items[match_index][1], items[match_index][1]
]); ]);
} }
@ -218,7 +218,7 @@ class FuzzySet {
for (let i = 0; i < end_index; ++i) { for (let i = 0; i < end_index; ++i) {
new_results.push([ new_results.push([
_distance(results[i][1], normalized_value), _distance(results[i][1], normalized_value),
results[i][1], results[i][1]
]); ]);
} }
results = new_results; results = new_results;

@ -105,7 +105,7 @@ export const reserved = new Set([
'void', 'void',
'while', 'while',
'with', 'with',
'yield', 'yield'
]); ]);
const void_element_names = /^(?:area|base|br|col|command|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)$/; const void_element_names = /^(?:area|base|br|col|command|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)$/;

@ -17,7 +17,7 @@ export const valid_namespaces = [
svg, svg,
xlink, xlink,
xml, xml,
xmlns, xmlns
]; ];
export const namespaces: Record<string, string> = { html, mathml, svg, xlink, xml, xmlns }; export const namespaces: Record<string, string> = { html, mathml, svg, xlink, xml, xmlns };

@ -52,7 +52,7 @@ const subscriber_queue = [];
*/ */
export function readable<T>(value: T, start: StartStopNotifier<T>): Readable<T> { export function readable<T>(value: T, start: StartStopNotifier<T>): Readable<T> {
return { return {
subscribe: writable(value, start).subscribe, subscribe: writable(value, start).subscribe
}; };
} }
@ -184,7 +184,7 @@ export function derived<T>(stores: Stores, fn: Function, initial_value?: T): Rea
}, },
() => { () => {
pending |= (1 << i); pending |= (1 << i);
}), })
); );
inited = true; inited = true;

@ -12,7 +12,7 @@ export default {
13: .foocc {color: red;}`, 13: .foocc {color: red;}`,
start: { line: 11, column: 2, character: 206 }, start: { line: 11, column: 2, character: 206 },
end: { line: 11, column: 8, character: 212 }, end: { line: 11, column: 8, character: 212 },
pos: 206, pos: 206
}, },
{ {
code: 'css-unused-selector', code: 'css-unused-selector',
@ -26,7 +26,7 @@ export default {
14: .foodd {color: red;}`, 14: .foodd {color: red;}`,
start: { line: 12, column: 2, character: 229 }, start: { line: 12, column: 2, character: 229 },
end: { line: 12, column: 8, character: 235 }, end: { line: 12, column: 8, character: 235 },
pos: 229, pos: 229
}, },
{ {
code: 'css-unused-selector', code: 'css-unused-selector',
@ -40,7 +40,7 @@ export default {
16: .bb {color: red;}`, 16: .bb {color: red;}`,
start: { line: 14, column: 2, character: 275 }, start: { line: 14, column: 2, character: 275 },
end: { line: 14, column: 8, character: 281 }, end: { line: 14, column: 8, character: 281 },
pos: 275, pos: 275
}, },
{ {
code: 'css-unused-selector', code: 'css-unused-selector',
@ -54,7 +54,7 @@ export default {
22: .ddbar {color: red;}`, 22: .ddbar {color: red;}`,
start: { line: 20, column: 2, character: 401 }, start: { line: 20, column: 2, character: 401 },
end: { line: 20, column: 8, character: 407 }, end: { line: 20, column: 8, character: 407 },
pos: 401, pos: 401
}, },
{ {
code: 'css-unused-selector', code: 'css-unused-selector',
@ -68,7 +68,7 @@ export default {
23: .fooaabar {color: red;}`, 23: .fooaabar {color: red;}`,
start: { line: 21, column: 2, character: 424 }, start: { line: 21, column: 2, character: 424 },
end: { line: 21, column: 8, character: 430 }, end: { line: 21, column: 8, character: 430 },
pos: 424, pos: 424
}, },
{ {
code: 'css-unused-selector', code: 'css-unused-selector',
@ -82,7 +82,7 @@ export default {
24: .foobbbar {color: red;}`, 24: .foobbbar {color: red;}`,
start: { line: 22, column: 2, character: 447 }, start: { line: 22, column: 2, character: 447 },
end: { line: 22, column: 8, character: 453 }, end: { line: 22, column: 8, character: 453 },
pos: 447, pos: 447
}, },
{ {
code: 'css-unused-selector', code: 'css-unused-selector',
@ -96,7 +96,7 @@ export default {
25: .fooccbar {color: red;}`, 25: .fooccbar {color: red;}`,
start: { line: 23, column: 2, character: 470 }, start: { line: 23, column: 2, character: 470 },
end: { line: 23, column: 11, character: 479 }, end: { line: 23, column: 11, character: 479 },
pos: 470, pos: 470
}, },
{ {
code: 'css-unused-selector', code: 'css-unused-selector',
@ -110,7 +110,7 @@ export default {
26: .fooddbar {color: red;}`, 26: .fooddbar {color: red;}`,
start: { line: 24, column: 2, character: 496 }, start: { line: 24, column: 2, character: 496 },
end: { line: 24, column: 11, character: 505 }, end: { line: 24, column: 11, character: 505 },
pos: 496, pos: 496
}, },
{ {
code: 'css-unused-selector', code: 'css-unused-selector',
@ -124,7 +124,7 @@ export default {
27: .baz {color: red;}`, 27: .baz {color: red;}`,
start: { line: 25, column: 2, character: 522 }, start: { line: 25, column: 2, character: 522 },
end: { line: 25, column: 11, character: 531 }, end: { line: 25, column: 11, character: 531 },
pos: 522, pos: 522
}, },
{ {
code: 'css-unused-selector', code: 'css-unused-selector',
@ -137,7 +137,7 @@ export default {
29: </style>`, 29: </style>`,
start: { line: 28, column: 2, character: 595 }, start: { line: 28, column: 2, character: 595 },
end: { line: 28, column: 9, character: 602 }, end: { line: 28, column: 9, character: 602 },
pos: 595, pos: 595
}, }
], ]
}; };

@ -1,3 +1,3 @@
export default { export default {
warnings: [], warnings: []
}; };

@ -5,7 +5,7 @@ export default {
end: { end: {
character: 205, character: 205,
column: 9, column: 9,
line: 14, line: 14
}, },
frame: ` frame: `
12: .thing.active {color: blue;} 12: .thing.active {color: blue;}
@ -18,8 +18,8 @@ export default {
start: { start: {
character: 198, character: 198,
column: 2, column: 2,
line: 14, line: 14
}, }
}, }
], ]
}; };

@ -12,7 +12,7 @@ export default {
17: .unused {color: blue;}`, 17: .unused {color: blue;}`,
start: { line: 15, column: 2, character: 261 }, start: { line: 15, column: 2, character: 261 },
end: { line: 15, column: 15, character: 274 }, end: { line: 15, column: 15, character: 274 },
pos: 261, pos: 261
}, },
{ {
code: 'css-unused-selector', code: 'css-unused-selector',
@ -25,7 +25,7 @@ export default {
18: </style>`, 18: </style>`,
start: { line: 17, column: 2, character: 295 }, start: { line: 17, column: 2, character: 295 },
end: { line: 17, column: 9, character: 302 }, end: { line: 17, column: 9, character: 302 },
pos: 295, pos: 295
}, }
], ]
}; };

@ -153,6 +153,7 @@ export function normalizeHtml(window, html) {
export function setupHtmlEqual() { export function setupHtmlEqual() {
const window = env(); const window = env();
// eslint-disable-next-line no-import-assign
assert.htmlEqual = (actual, expected, message) => { assert.htmlEqual = (actual, expected, message) => {
assert.deepEqual( assert.deepEqual(
normalizeHtml(window, actual), normalizeHtml(window, actual),

@ -7,7 +7,7 @@ export default {
return { return {
nullText, nullText,
undefinedText, undefinedText
}; };
}, },
@ -17,5 +17,5 @@ export default {
assert.equal(nullText, snapshot.nullText); assert.equal(nullText, snapshot.nullText);
assert.equal(undefinedText, snapshot.undefinedText); assert.equal(undefinedText, snapshot.undefinedText);
}, }
}; };

@ -3,7 +3,7 @@ export default {
const h1 = target.querySelector('h1'); const h1 = target.querySelector('h1');
return { return {
h1, h1
}; };
}, },

@ -1,6 +1,6 @@
export default { export default {
options: { options: {
dev: true, dev: true,
loopGuardTimeout: 100, loopGuardTimeout: 100
}, }
}; };

@ -2,7 +2,7 @@ export default {
preprocess: [ preprocess: [
{ {
script: ({ content }) => ({ code: content.replace(/one/g, 'two') }), script: ({ content }) => ({ code: content.replace(/one/g, 'two') }),
style: ({ content }) => ({ code: content.replace(/one/g, 'three') }), style: ({ content }) => ({ code: content.replace(/one/g, 'three') })
}, }
], ]
}; };

@ -11,7 +11,7 @@ export default {
<div d="4" e="5" foo="1"></div> <div d="4" e="5" foo="1"></div>
<button></button><button></button><button></button><button></button> <button></button><button></button><button></button><button></button>
`, `,
async test({ assert, target, window, }) { async test({ assert, target, window }) {
const [btn1, btn2, btn3, btn4] = target.querySelectorAll('button'); const [btn1, btn2, btn3, btn4] = target.querySelectorAll('button');
const clickEvent = new window.MouseEvent('click'); const clickEvent = new window.MouseEvent('click');

@ -13,7 +13,7 @@ export default {
<button></button><button></button><button></button><button></button> <button></button><button></button><button></button><button></button>
`, `,
async test({ assert, target, window, }) { async test({ assert, target, window }) {
const [btn1, btn2, btn3, btn4] = target.querySelectorAll('button'); const [btn1, btn2, btn3, btn4] = target.querySelectorAll('button');
const clickEvent = new window.MouseEvent('click'); const clickEvent = new window.MouseEvent('click');

@ -18,5 +18,5 @@ export default {
input.dispatchEvent(event); input.dispatchEvent(event);
assert.ok(blurred); assert.ok(blurred);
}, }
}; };

@ -1,7 +1,7 @@
export default { export default {
props: { props: {
target: 'World!', target: 'World!',
display: true, display: true
}, },
html: ` html: `
@ -16,5 +16,5 @@ export default {
assert.htmlEqual(target.innerHTML, ` assert.htmlEqual(target.innerHTML, `
<h1>Hello World!</h1> <h1>Hello World!</h1>
`); `);
}, }
}; };

@ -7,5 +7,5 @@ export default {
await button.dispatchEvent(click); await button.dispatchEvent(click);
await Promise.resolve(); await Promise.resolve();
assert.htmlEqual(target.innerHTML, `<button>2</button>`); assert.htmlEqual(target.innerHTML, `<button>2</button>`);
}, }
}; };

@ -1,7 +1,7 @@
const value = []; const value = [];
export default { export default {
props: { props: {
value, value
}, },
async test({ assert, component, target, window }) { async test({ assert, component, target, window }) {
@ -32,7 +32,7 @@ export default {
'15', '15',
'16', '16',
'17', '17',
'18', '18'
]); ]);
}, }
}; };

@ -33,5 +33,5 @@ export default {
<input> <input>
<p>HE</p> <p>HE</p>
`); `);
}, }
}; };

@ -3,5 +3,5 @@ export default {
test({ assert, component, target }) { test({ assert, component, target }) {
const textarea = target.querySelector('textarea'); const textarea = target.querySelector('textarea');
assert.ok(textarea.readOnly === false); assert.ok(textarea.readOnly === false);
}, }
}; };

@ -3,5 +3,5 @@ export default {
test({ assert, component, target }) { test({ assert, component, target }) {
const textarea = target.querySelector('textarea'); const textarea = target.querySelector('textarea');
assert.ok(textarea.readOnly); assert.ok(textarea.readOnly);
}, }
}; };

@ -1,3 +1,3 @@
export default { export default {
html: '<div data-potato=""></div>', html: '<div data-potato=""></div>'
}; };

@ -1,5 +1,5 @@
export default { export default {
html: ` html: `
<div><div title='foo'>bar</div></div> <div><div title='foo'>bar</div></div>
`, `
}; };

@ -1,3 +1,3 @@
export default { export default {
html: `<div class="false"></div>`, html: `<div class="false"></div>`
}; };

@ -1,7 +1,7 @@
export default { export default {
props: { props: {
testName1: "test1", testName1: "test1",
testName2: "test2", testName2: "test2"
}, },
html: `<div class="test1test2"></div>`, html: `<div class="test1test2"></div>`,

@ -1,7 +1,7 @@
export default { export default {
props: { props: {
testName1: "test1", testName1: "test1",
testName2: "test2", testName2: "test2"
}, },
html: `<div class="test1test2 svelte-x1o6ra"></div>`, html: `<div class="test1test2 svelte-x1o6ra"></div>`,

@ -1,7 +1,7 @@
export default { export default {
props: { props: {
testName1: "test1", testName1: "test1",
testName2: "test2", testName2: "test2"
}, },
html: `<div class="test1test2"></div>`, html: `<div class="test1test2"></div>`,

@ -1,7 +1,7 @@
export default { export default {
props: { props: {
testName1: "test1", testName1: "test1",
testName2: "test2", testName2: "test2"
}, },
html: `<div class="test1test2 svelte-x1o6ra"></div>`, html: `<div class="test1test2 svelte-x1o6ra"></div>`,

@ -1,3 +1,3 @@
export default { export default {
html: `<div></div>`, html: `<div></div>`
}; };

@ -2,7 +2,7 @@ export default {
skip_if_ssr: true, skip_if_ssr: true,
props: { props: {
foo: false, foo: false
}, },
test({ assert, component, target }) { test({ assert, component, target }) {
@ -15,5 +15,5 @@ export default {
assert.ok(!inputs[0].checked); assert.ok(!inputs[0].checked);
assert.ok(inputs[1].checked); assert.ok(inputs[1].checked);
}, }
}; };

@ -1,3 +1,3 @@
export default { export default {
html: `<div></div>`, html: `<div></div>`
}; };

@ -1,7 +1,7 @@
export default { export default {
props: { props: {
thePromise: new Promise((_) => {}), thePromise: new Promise((_) => {}),
count: 0, count: 0
}, },
html: ` html: `
@ -60,5 +60,5 @@ export default {
</div> </div>
` `
); );
}, }
}; };

@ -1,7 +1,7 @@
export default { export default {
props: { props: {
thePromise: new Promise((_) => {}), thePromise: new Promise((_) => {}),
count: 0, count: 0
}, },
html: ` html: `
@ -56,5 +56,5 @@ export default {
</div> </div>
` `
); );
}, }
}; };

@ -36,5 +36,5 @@ export default {
<editor contenteditable="true">good<span>bye</span></editor> <editor contenteditable="true">good<span>bye</span></editor>
<p>hello good<span>bye</span></p> <p>hello good<span>bye</span></p>
`); `);
}, }
}; };

@ -1,6 +1,6 @@
export default { export default {
props: { props: {
name: '<b>world</b>', name: '<b>world</b>'
}, },
html: ` html: `
@ -34,5 +34,5 @@ export default {
<editor contenteditable="true">good<span>bye</span></editor> <editor contenteditable="true">good<span>bye</span></editor>
<p>hello good<span>bye</span></p> <p>hello good<span>bye</span></p>
`); `);
}, }
}; };

@ -30,5 +30,5 @@ export default {
<editor contenteditable="true">goodbye</editor> <editor contenteditable="true">goodbye</editor>
<p>hello goodbye</p> <p>hello goodbye</p>
`); `);
}, }
}; };

@ -1,6 +1,6 @@
export default { export default {
props: { props: {
name: 'world', name: 'world'
}, },
html: ` html: `
@ -28,5 +28,5 @@ export default {
<editor contenteditable="true">goodbye</editor> <editor contenteditable="true">goodbye</editor>
<p>hello goodbye</p> <p>hello goodbye</p>
`); `);
}, }
}; };

@ -2,7 +2,7 @@ export default {
skip_if_ssr: true, skip_if_ssr: true,
props: { props: {
indeterminate: true, indeterminate: true
}, },
html: ` html: `
@ -38,5 +38,5 @@ export default {
<p>checked? true</p> <p>checked? true</p>
<p>indeterminate? true</p> <p>indeterminate? true</p>
`); `);
}, }
}; };

@ -3,13 +3,13 @@ export default {
cats: [ cats: [
{ {
name: "cat 0", name: "cat 0",
checked: false, checked: false
}, },
{ {
name: "cat 1", name: "cat 1",
checked: false, checked: false
}, }
], ]
}, },
html: ` html: `
@ -22,7 +22,7 @@ export default {
const newCats = cats.slice(); const newCats = cats.slice();
newCats.push({ newCats.push({
name: "cat " + cats.length, name: "cat " + cats.length,
checked: false, checked: false
}); });
component.cats = newCats; component.cats = newCats;

@ -77,5 +77,5 @@ export default {
assert.equal(inputs[5].checked, false); assert.equal(inputs[5].checked, false);
assert.equal(inputs[6].checked, false); assert.equal(inputs[6].checked, false);
assert.equal(inputs[7].checked, true); assert.equal(inputs[7].checked, true);
}, }
}; };

@ -7,13 +7,13 @@ const values = [
const selected_array = [ const selected_array = [
[values[1]], [values[1]],
[], [],
[values[2]], [values[2]]
]; ];
export default { export default {
props: { props: {
values, values,
selected_array, selected_array
}, },
html: ` html: `

@ -7,13 +7,13 @@ const values = [
const selected_array = [ const selected_array = [
[values[1]], [values[1]],
[], [],
[values[2]], [values[2]]
]; ];
export default { export default {
props: { props: {
values, values,
selected_array, selected_array
}, },
html: ` html: `

@ -27,5 +27,5 @@ export default {
component.value = 1; component.value = 1;
assert.equal(component.value, 1); assert.equal(component.value, 1);
assert.equal(input.value, "1"); assert.equal(input.value, "1");
}, }
}; };

@ -1,6 +1,6 @@
export default { export default {
props: { props: {
count: 42, count: 42
}, },
html: ` html: `
@ -44,5 +44,5 @@ export default {
<input type='number'> <input type='number'>
<p>undefined undefined</p> <p>undefined undefined</p>
`); `);
}, }
}; };

@ -29,5 +29,5 @@ export default {
<input type=range min=0 max=20> <input type=range min=0 max=20>
<p>20 of 20</p> <p>20 of 20</p>
`); `);
}, }
}; };

@ -1,6 +1,6 @@
export default { export default {
props: { props: {
count: 42, count: 42
}, },
html: ` html: `
@ -34,5 +34,5 @@ export default {
<input type='range'> <input type='range'>
<p>number 44</p> <p>number 44</p>
`); `);
}, }
}; };

@ -1,6 +1,6 @@
export default { export default {
props: { props: {
count: 42, count: 42
}, },
html: ` html: `
@ -34,5 +34,5 @@ export default {
<input type='range'> <input type='range'>
<p>number 44</p> <p>number 44</p>
`); `);
}, }
}; };

@ -1,7 +1,7 @@
export default { export default {
props: { props: {
foo: 'a', foo: 'a',
items: ['x'], items: ['x']
}, },
html: ` html: `
@ -32,5 +32,5 @@ export default {
<div><input><p>b</p></div> <div><input><p>b</p></div>
<div><input><p>y</p></div> <div><input><p>y</p></div>
`); `);
}, }
}; };

@ -121,5 +121,5 @@ export default {
<p>done:one / done:two / remaining:four</p> <p>done:one / done:two / remaining:four</p>
`); `);
}, }
}; };

@ -1,6 +1,6 @@
export default { export default {
props: { props: {
items: ['one', 'two', 'three'], items: ['one', 'two', 'three']
}, },
html: ` html: `
@ -65,5 +65,5 @@ export default {
<input><p>five</p> <input><p>five</p>
</div> </div>
`); `);
}, }
}; };

@ -1,8 +1,8 @@
export default { export default {
props: { props: {
component: { component: {
name: 'world', name: 'world'
}, }
}, },
html: ` html: `
@ -36,5 +36,5 @@ export default {
<h1>Hello goodbye!</h1> <h1>Hello goodbye!</h1>
<input> <input>
`); `);
}, }
}; };

@ -4,8 +4,8 @@ export default {
obj: { obj: {
foo: 'a', foo: 'a',
bar: 'b', bar: 'b',
baz: 'c', baz: 'c'
}, }
}, },
html: ` html: `
@ -56,5 +56,5 @@ export default {
<input> <input>
<pre>{"foo":"d","bar":"e","baz":"f"}</pre> <pre>{"foo":"d","bar":"e","baz":"f"}</pre>
`); `);
}, }
}; };

@ -2,8 +2,8 @@ export default {
props: { props: {
prop: 'name', prop: 'name',
user: { user: {
name: 'alice', name: 'alice'
}, }
}, },
html: ` html: `
@ -40,5 +40,5 @@ export default {
<input> <input>
<p>hello carol</p> <p>hello carol</p>
`); `);
}, }
}; };

@ -5,9 +5,9 @@ export default {
{ {
foo: 'a', foo: 'a',
bar: 'b', bar: 'b',
baz: 'c', baz: 'c'
}, }
], ]
}, },
html: ` html: `
@ -58,5 +58,5 @@ export default {
<input> <input>
<pre>{"foo":"d","bar":"e","baz":"f"}</pre> <pre>{"foo":"d","bar":"e","baz":"f"}</pre>
`); `);
}, }
}; };

@ -3,8 +3,8 @@ export default {
items: [ items: [
{ description: 'one' }, { description: 'one' },
{ description: 'two' }, { description: 'two' },
{ description: 'three' }, { description: 'three' }
], ]
}, },
html: ` html: `
@ -45,5 +45,5 @@ export default {
<div><input><p>four</p></div> <div><input><p>four</p></div>
<div><input><p>five</p></div> <div><input><p>five</p></div>
`); `);
}, }
}; };

@ -1,8 +1,8 @@
export default { export default {
props: { props: {
user: { user: {
name: 'alice', name: 'alice'
}, }
}, },
html: ` html: `
@ -39,5 +39,5 @@ export default {
<input> <input>
<p>hello carol</p> <p>hello carol</p>
`); `);
}, }
}; };

@ -26,5 +26,5 @@ export default {
component.x = undefined; component.x = undefined;
assert.equal(input.value, ''); assert.equal(input.value, '');
}, }
}; };

@ -1,6 +1,6 @@
export default { export default {
props: { props: {
name: 'world', name: 'world'
}, },
html: ` html: `
@ -33,5 +33,5 @@ export default {
<input> <input>
<p>hello goodbye</p> <p>hello goodbye</p>
`); `);
}, }
}; };

@ -24,7 +24,7 @@ export default {
`, `,
props: { props: {
selected: 'b', selected: 'b'
}, },
test({ assert, component, target }) { test({ assert, component, target }) {
@ -33,5 +33,5 @@ export default {
assert.equal(select.value, 'b'); assert.equal(select.value, 'b');
assert.ok(options[1].selected); assert.ok(options[1].selected);
}, }
}; };

@ -45,5 +45,5 @@ export default {
</optgroup> </optgroup>
</select> </select>
`); `);
}, }
}; };

@ -24,7 +24,7 @@ export default {
`, `,
props: { props: {
selected: 'one', selected: 'one'
}, },
async test({ assert, component, target, window }) { async test({ assert, component, target, window }) {
@ -53,5 +53,5 @@ export default {
`); `);
component.selected = 'three'; component.selected = 'three';
}, }
}; };

@ -37,5 +37,5 @@ export default {
assert.deepEqual(names, ['world', 'everybody', 'goodbye']); assert.deepEqual(names, ['world', 'everybody', 'goodbye']);
unsubscribe(); unsubscribe();
}, }
}; };

@ -37,5 +37,5 @@ export default {
assert.deepEqual(names, ['world', 'everybody', 'goodbye']); assert.deepEqual(names, ['world', 'everybody', 'goodbye']);
unsubscribe(); unsubscribe();
}, }
}; };

@ -1,6 +1,6 @@
export default { export default {
props: { props: {
value: 'some text', value: 'some text'
}, },
html: ` html: `
@ -33,5 +33,5 @@ export default {
<textarea></textarea> <textarea></textarea>
<p>goodbye</p> <p>goodbye</p>
`); `);
}, }
}; };

@ -5,7 +5,7 @@ function callback(refs) {
export default { export default {
html: ``, html: ``,
props: { props: {
callback, callback
}, },
after_test() { after_test() {
calls = []; calls = [];
@ -49,5 +49,5 @@ export default {
assert.equal(calls[6][0].ref, divs[0]); assert.equal(calls[6][0].ref, divs[0]);
assert.equal(calls[6][1].ref, divs[1]); assert.equal(calls[6][1].ref, divs[1]);
assert.equal(calls[6][2].ref, divs[2]); assert.equal(calls[6][2].ref, divs[2]);
}, }
}; };

@ -1,3 +1,3 @@
export default { export default {
error: `potato is not defined`, error: `potato is not defined`
}; };

@ -1,3 +1,3 @@
export default { export default {
error: `A is not defined`, error: `A is not defined`
}; };

@ -90,7 +90,7 @@ export default {
assert.deepEqual(component.reads, { assert.deepEqual(component.reads, {
_0: 2, _0: 2,
_1: 2, _1: 2
}); });
} }
}; };

@ -1,6 +1,6 @@
export default { export default {
props: { props: {
primary: true, primary: true
}, },
html: `<div class="test-class primary" role="button"></div>`, html: `<div class="test-class primary" role="button"></div>`,
@ -14,5 +14,5 @@ export default {
<div class="test-class primary" role="button"></div> <div class="test-class primary" role="button"></div>
` `
); );
}, }
}; };

@ -21,5 +21,5 @@ export default {
<input> <input>
<p>blah</p> <p>blah</p>
`); `);
}, }
}; };

@ -57,5 +57,5 @@ export default {
assert.equal(input1.value, "456"); assert.equal(input1.value, "456");
assert.equal(input2.value, "456"); assert.equal(input2.value, "456");
assert.equal(count, 3); assert.equal(count, 3);
}, }
}; };

@ -1,6 +1,6 @@
export default { export default {
props: { props: {
value: 1, value: 1
}, },
test({ assert, component, target, window }) { test({ assert, component, target, window }) {
@ -26,5 +26,5 @@ export default {
{ value: 2 }, { value: 2 },
{ value: 2 } { value: 2 }
]); ]);
}, }
}; };

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save