diff --git a/src/compiler/compile/utils/compare_node.ts b/src/compiler/compile/utils/compare_node.ts index a5ff42dc82..3cd9321ea9 100644 --- a/src/compiler/compile/utils/compare_node.ts +++ b/src/compiler/compile/utils/compare_node.ts @@ -12,8 +12,8 @@ export function compare_node(a: Node | void, b: Node | void) { compare_node(a.object, (b as MemberExpression).object) && compare_node(a.property, (b as MemberExpression).property) && a.computed === (b as MemberExpression).computed - ); - case 'Literal': - return a.value === (b as Literal).value; + ); + case 'Literal': + return a.value === (b as Literal).value; } } diff --git a/src/compiler/compile/utils/stringify.ts b/src/compiler/compile/utils/stringify.ts index 11649158b3..aa1c42c512 100644 --- a/src/compiler/compile/utils/stringify.ts +++ b/src/compiler/compile/utils/stringify.ts @@ -12,8 +12,8 @@ export function escape(data: string, { only_escape_at_symbol = false } = {}) { } const escaped = { - '"': '"', - "'": ''', + '"': '"', + "'": ''', '&': '&', '<': '<', '>': '>' diff --git a/test/parser/index.ts b/test/parser/index.ts index 384f6a2681..fe48737c96 100644 --- a/test/parser/index.ts +++ b/test/parser/index.ts @@ -1,6 +1,6 @@ import * as assert from 'assert'; import * as fs from 'fs'; -import { svelte, tryToLoadJson, shouldUpdateExpected } from '../helpers'; +import { svelte, tryToLoadJson } from '../helpers'; describe('parse', () => { fs.readdirSync(`${__dirname}/samples`).forEach(dir => { diff --git a/test/runtime/samples/nested-transition-if-block-not-remounted/_config.js b/test/runtime/samples/nested-transition-if-block-not-remounted/_config.js index 30ff83b39f..1f2d5561fe 100644 --- a/test/runtime/samples/nested-transition-if-block-not-remounted/_config.js +++ b/test/runtime/samples/nested-transition-if-block-not-remounted/_config.js @@ -11,9 +11,8 @@ export default { `, - test({ assert, component, target, window, raf }) { + test({ component, target }) { const div = target.querySelector('div'); - const { appendChild, insertBefore } = div; div.appendChild = div.insertBefore = () => { throw new Error('DOM was mutated'); diff --git a/test/runtime/samples/ondestroy-before-cleanup/_config.js b/test/runtime/samples/ondestroy-before-cleanup/_config.js index e9721f24b0..80cc54bd6b 100644 --- a/test/runtime/samples/ondestroy-before-cleanup/_config.js +++ b/test/runtime/samples/ondestroy-before-cleanup/_config.js @@ -4,7 +4,6 @@ export default { test({ assert, component, target }) { container.div = null; - const top = component.top; const div = target.querySelector('div'); component.visible = false; diff --git a/test/runtime/samples/store-resubscribe-export/_config.js b/test/runtime/samples/store-resubscribe-export/_config.js index 525eb39d51..f6630aa045 100644 --- a/test/runtime/samples/store-resubscribe-export/_config.js +++ b/test/runtime/samples/store-resubscribe-export/_config.js @@ -1,11 +1,11 @@ -let subscribeCalled = false; +let unsubscribeCalled = false; const fakeStore = val => ({ subscribe: cb => { cb(val); return { unsubscribe: () => { - subscribeCalled = true; + unsubscribeCalled = true; } }; } @@ -22,6 +22,8 @@ export default { async test({ assert, component, target }) { component.foo = fakeStore(5); - return assert.htmlEqual(target.innerHTML, '

5

'); + assert.htmlEqual(target.innerHTML, '

5

'); + + assert.ok(unsubscribeCalled); } }; diff --git a/test/runtime/samples/this-in-function-expressions/_config.js b/test/runtime/samples/this-in-function-expressions/_config.js index e5527f0e1d..9aea4c3631 100644 --- a/test/runtime/samples/this-in-function-expressions/_config.js +++ b/test/runtime/samples/this-in-function-expressions/_config.js @@ -1,5 +1,5 @@ export default { - async test({ assert, component, target, window, raf }) { + async test({ assert, target, window }) { const [_, btn] = target.querySelectorAll('button'); const clickEvent = new window.MouseEvent('click'); diff --git a/test/runtime/samples/transition-js-await-block/_config.js b/test/runtime/samples/transition-js-await-block/_config.js index 80546ae6b8..696a2dd5d4 100644 --- a/test/runtime/samples/transition-js-await-block/_config.js +++ b/test/runtime/samples/transition-js-await-block/_config.js @@ -1,9 +1,7 @@ let fulfil; -let reject; -const promise = new Promise((f, r) => { +const promise = new Promise((f) => { fulfil = f; - reject = r; }); export default {