update tests

pull/755/head
Rich Harris 7 years ago
parent 85f5ebdec1
commit 44b73191c7

@ -1,4 +1,5 @@
import { assign } from './utils.js'; import { assign } from './utils.js';
import { noop } from './utils.js';
export * from './dom.js'; export * from './dom.js';
export * from './transitions.js'; export * from './transitions.js';
export * from './utils.js'; export * from './utils.js';

@ -39,6 +39,7 @@ function setAttribute(node, attribute, value) {
function destroy(detach) { function destroy(detach) {
if (!this._destroyed) { if (!this._destroyed) {
this.set = noop;
this.fire('destroy'); this.fire('destroy');
if (detach !== false) this._fragment.unmount(); if (detach !== false) this._fragment.unmount();
@ -127,7 +128,6 @@ function on(eventName, handler) {
} }
function set(newState) { function set(newState) {
if (this._destroyed) return;
this._set(assign({}, newState)); this._set(assign({}, newState));
if (this._root._lock) return; if (this._root._lock) return;
this._root._lock = true; this._root._lock = true;

@ -15,6 +15,7 @@ function assign(target) {
function destroy(detach) { function destroy(detach) {
if (!this._destroyed) { if (!this._destroyed) {
this.set = noop;
this.fire('destroy'); this.fire('destroy');
if (detach !== false) this._fragment.unmount(); if (detach !== false) this._fragment.unmount();
@ -103,7 +104,6 @@ function on(eventName, handler) {
} }
function set(newState) { function set(newState) {
if (this._destroyed) return;
this._set(assign({}, newState)); this._set(assign({}, newState));
if (this._root._lock) return; if (this._root._lock) return;
this._root._lock = true; this._root._lock = true;

@ -35,6 +35,7 @@ function setAttribute(node, attribute, value) {
function destroy(detach) { function destroy(detach) {
if (!this._destroyed) { if (!this._destroyed) {
this.set = noop;
this.fire('destroy'); this.fire('destroy');
if (detach !== false) this._fragment.unmount(); if (detach !== false) this._fragment.unmount();
@ -123,7 +124,6 @@ function on(eventName, handler) {
} }
function set(newState) { function set(newState) {
if (this._destroyed) return;
this._set(assign({}, newState)); this._set(assign({}, newState));
if (this._root._lock) return; if (this._root._lock) return;
this._root._lock = true; this._root._lock = true;

@ -48,6 +48,7 @@ function createText(data) {
function destroy(detach) { function destroy(detach) {
if (!this._destroyed) { if (!this._destroyed) {
this.set = noop;
this.fire('destroy'); this.fire('destroy');
if (detach !== false) this._fragment.unmount(); if (detach !== false) this._fragment.unmount();
@ -136,7 +137,6 @@ function on(eventName, handler) {
} }
function set(newState) { function set(newState) {
if (this._destroyed) return;
this._set(assign({}, newState)); this._set(assign({}, newState));
if (this._root._lock) return; if (this._root._lock) return;
this._root._lock = true; this._root._lock = true;

@ -1,3 +1,5 @@
function noop() {}
function assign(target) { function assign(target) {
var k, var k,
source, source,
@ -33,6 +35,7 @@ function createText(data) {
function destroy(detach) { function destroy(detach) {
if (!this._destroyed) { if (!this._destroyed) {
this.set = noop;
this.fire('destroy'); this.fire('destroy');
if (detach !== false) this._fragment.unmount(); if (detach !== false) this._fragment.unmount();
@ -121,7 +124,6 @@ function on(eventName, handler) {
} }
function set(newState) { function set(newState) {
if (this._destroyed) return;
this._set(assign({}, newState)); this._set(assign({}, newState));
if (this._root._lock) return; if (this._root._lock) return;
this._root._lock = true; this._root._lock = true;

@ -39,6 +39,7 @@ function createComment() {
function destroy(detach) { function destroy(detach) {
if (!this._destroyed) { if (!this._destroyed) {
this.set = noop;
this.fire('destroy'); this.fire('destroy');
if (detach !== false) this._fragment.unmount(); if (detach !== false) this._fragment.unmount();
@ -127,7 +128,6 @@ function on(eventName, handler) {
} }
function set(newState) { function set(newState) {
if (this._destroyed) return;
this._set(assign({}, newState)); this._set(assign({}, newState));
if (this._root._lock) return; if (this._root._lock) return;
this._root._lock = true; this._root._lock = true;

@ -39,6 +39,7 @@ function createComment() {
function destroy(detach) { function destroy(detach) {
if (!this._destroyed) { if (!this._destroyed) {
this.set = noop;
this.fire('destroy'); this.fire('destroy');
if (detach !== false) this._fragment.unmount(); if (detach !== false) this._fragment.unmount();
@ -127,7 +128,6 @@ function on(eventName, handler) {
} }
function set(newState) { function set(newState) {
if (this._destroyed) return;
this._set(assign({}, newState)); this._set(assign({}, newState));
if (this._root._lock) return; if (this._root._lock) return;
this._root._lock = true; this._root._lock = true;

@ -1,5 +1,7 @@
import Imported from 'Imported.html'; import Imported from 'Imported.html';
function noop() {}
function assign(target) { function assign(target) {
var k, var k,
source, source,
@ -27,6 +29,7 @@ function createText(data) {
function destroy(detach) { function destroy(detach) {
if (!this._destroyed) { if (!this._destroyed) {
this.set = noop;
this.fire('destroy'); this.fire('destroy');
if (detach !== false) this._fragment.unmount(); if (detach !== false) this._fragment.unmount();
@ -115,7 +118,6 @@ function on(eventName, handler) {
} }
function set(newState) { function set(newState) {
if (this._destroyed) return;
this._set(assign({}, newState)); this._set(assign({}, newState));
if (this._root._lock) return; if (this._root._lock) return;
this._root._lock = true; this._root._lock = true;

@ -15,6 +15,7 @@ function assign(target) {
function destroy(detach) { function destroy(detach) {
if (!this._destroyed) { if (!this._destroyed) {
this.set = noop;
this.fire('destroy'); this.fire('destroy');
if (detach !== false) this._fragment.unmount(); if (detach !== false) this._fragment.unmount();
@ -103,7 +104,6 @@ function on(eventName, handler) {
} }
function set(newState) { function set(newState) {
if (this._destroyed) return;
this._set(assign({}, newState)); this._set(assign({}, newState));
if (this._root._lock) return; if (this._root._lock) return;
this._root._lock = true; this._root._lock = true;
@ -158,7 +158,7 @@ function SvelteComponent ( options ) {
}; };
this._handlers = Object.create( null ); this._handlers = Object.create( null );
this._handlers.destroy = [template.ondestroy.bind(this)]; this._handlers.destroy = [template.ondestroy];
this._root = options._root || this; this._root = options._root || this;
this._yield = options._yield; this._yield = options._yield;

@ -31,7 +31,7 @@ function SvelteComponent ( options ) {
}; };
this._handlers = Object.create( null ); this._handlers = Object.create( null );
this._handlers.destroy = [template.ondestroy.bind(this)] this._handlers.destroy = [template.ondestroy]
this._root = options._root || this; this._root = options._root || this;
this._yield = options._yield; this._yield = options._yield;

@ -15,6 +15,7 @@ function assign(target) {
function destroy(detach) { function destroy(detach) {
if (!this._destroyed) { if (!this._destroyed) {
this.set = noop;
this.fire('destroy'); this.fire('destroy');
if (detach !== false) this._fragment.unmount(); if (detach !== false) this._fragment.unmount();
@ -103,7 +104,6 @@ function on(eventName, handler) {
} }
function set(newState) { function set(newState) {
if (this._destroyed) return;
this._set(assign({}, newState)); this._set(assign({}, newState));
if (this._root._lock) return; if (this._root._lock) return;
this._root._lock = true; this._root._lock = true;

@ -39,6 +39,7 @@ function createComment() {
function destroy(detach) { function destroy(detach) {
if (!this._destroyed) { if (!this._destroyed) {
this.set = noop;
this.fire('destroy'); this.fire('destroy');
if (detach !== false) this._fragment.unmount(); if (detach !== false) this._fragment.unmount();
@ -127,7 +128,6 @@ function on(eventName, handler) {
} }
function set(newState) { function set(newState) {
if (this._destroyed) return;
this._set(assign({}, newState)); this._set(assign({}, newState));
if (this._root._lock) return; if (this._root._lock) return;
this._root._lock = true; this._root._lock = true;

Loading…
Cancel
Save