diff --git a/test/diff.js b/test/diff.js index db6497d..491e008 100644 --- a/test/diff.js +++ b/test/diff.js @@ -96,36 +96,117 @@ function abstractMorph (morph) { } t.test('events', function (t) { - t.test('should copy onclick events', function (t) { + t.test('should have onabort events(html attribute) ', function (t) { t.plan(1) - var a = html`` - var b = html`` + var expectationMet = false + var res = html`` + + raiseEvent(res, 'abort') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should not copy onabort events', function (t) { + t.plan(1) + var expectationMet = true + var a = html`` + var b = html`` var res = morph(a, b) - res.click() + raiseEvent(res, 'abort') - a = html`` - b = html`` - res = morph(a, b) + function fail (e) { + e.preventDefault() + expectationMet = false + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should copy onabort events(html arrtibute)', function (t) { + t.plan(1) + var expectationMet = false + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'abort') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should have onblur events(html attribute) ', function (t) { + t.plan(1) + var expectationMet = false + var res = html`` + + raiseEvent(res, 'blur') + + function pass (e) { + e.preventDefault() + expectationMet = true + } - res.click() + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should not copy onblur events', function (t) { + t.plan(1) + var expectationMet = true + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'blur') function fail (e) { e.preventDefault() - t.fail('should not be called') + expectationMet = false } + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should copy onblur events(html arrtibute)', function (t) { + t.plan(1) + var expectationMet = false + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'blur') + function pass (e) { e.preventDefault() - t.ok('called') + expectationMet = true } + + t.equal(expectationMet, true, 'result was expected') }) + t.test('should have onchange events(html attribute) ', function (t) { + t.plan(1) + var expectationMet = false + var res = html`` + + raiseEvent(res, 'change') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + t.equal(expectationMet, true, 'result was expected') + }) t.test('should not copy onchange events', function (t) { t.plan(1) var expectationMet = true - var a = html`` - var b = html`` + var a = html`` + var b = html`` var res = morph(a, b) raiseEvent(res, 'change') @@ -137,12 +218,11 @@ function abstractMorph (morph) { t.equal(expectationMet, true, 'result was expected') }) - - t.test('should copy onchange events', function (t) { + t.test('should copy onchange events(html arrtibute)', function (t) { t.plan(1) var expectationMet = false - var a = html`` - var b = html`` + var a = html`` + var b = html`` var res = morph(a, b) raiseEvent(res, 'change') @@ -152,6 +232,1616 @@ function abstractMorph (morph) { expectationMet = true } + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should have onclick events(html attribute) ', function (t) { + t.plan(1) + var expectationMet = false + var res = html`` + + raiseEvent(res, 'click') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should not copy onclick events', function (t) { + t.plan(1) + var expectationMet = true + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'click') + + function fail (e) { + e.preventDefault() + expectationMet = false + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should copy onclick events(html arrtibute)', function (t) { + t.plan(1) + var expectationMet = false + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'click') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should have oncontextmenu events(html attribute) ', function (t) { + t.plan(1) + var expectationMet = false + var res = html`` + + raiseEvent(res, 'contextmenu') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should not copy oncontextmenu events', function (t) { + t.plan(1) + var expectationMet = true + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'contextmenu') + + function fail (e) { + e.preventDefault() + expectationMet = false + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should copy oncontextmenu events(html arrtibute)', function (t) { + t.plan(1) + var expectationMet = false + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'contextmenu') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should have ondblclick events(html attribute) ', function (t) { + t.plan(1) + var expectationMet = false + var res = html`` + + raiseEvent(res, 'dblclick') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should not copy ondblclick events', function (t) { + t.plan(1) + var expectationMet = true + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'dblclick') + + function fail (e) { + e.preventDefault() + expectationMet = false + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should copy ondblclick events(html arrtibute)', function (t) { + t.plan(1) + var expectationMet = false + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'dblclick') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should have ondrag events(html attribute) ', function (t) { + t.plan(1) + var expectationMet = false + var res = html`` + + raiseEvent(res, 'drag') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should not copy ondrag events', function (t) { + t.plan(1) + var expectationMet = true + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'drag') + + function fail (e) { + e.preventDefault() + expectationMet = false + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should copy ondrag events(html arrtibute)', function (t) { + t.plan(1) + var expectationMet = false + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'drag') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should have ondragend events(html attribute) ', function (t) { + t.plan(1) + var expectationMet = false + var res = html`` + + raiseEvent(res, 'dragend') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should not copy ondragend events', function (t) { + t.plan(1) + var expectationMet = true + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'dragend') + + function fail (e) { + e.preventDefault() + expectationMet = false + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should copy ondragend events(html arrtibute)', function (t) { + t.plan(1) + var expectationMet = false + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'dragend') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should have ondragenter events(html attribute) ', function (t) { + t.plan(1) + var expectationMet = false + var res = html`` + + raiseEvent(res, 'dragenter') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should not copy ondragenter events', function (t) { + t.plan(1) + var expectationMet = true + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'dragenter') + + function fail (e) { + e.preventDefault() + expectationMet = false + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should copy ondragenter events(html arrtibute)', function (t) { + t.plan(1) + var expectationMet = false + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'dragenter') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should have ondragleave events(html attribute) ', function (t) { + t.plan(1) + var expectationMet = false + var res = html`` + + raiseEvent(res, 'dragleave') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should not copy ondragleave events', function (t) { + t.plan(1) + var expectationMet = true + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'dragleave') + + function fail (e) { + e.preventDefault() + expectationMet = false + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should copy ondragleave events(html arrtibute)', function (t) { + t.plan(1) + var expectationMet = false + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'dragleave') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should have ondragover events(html attribute) ', function (t) { + t.plan(1) + var expectationMet = false + var res = html`` + + raiseEvent(res, 'dragover') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should not copy ondragover events', function (t) { + t.plan(1) + var expectationMet = true + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'dragover') + + function fail (e) { + e.preventDefault() + expectationMet = false + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should copy ondragover events(html arrtibute)', function (t) { + t.plan(1) + var expectationMet = false + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'dragover') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should have ondragstart events(html attribute) ', function (t) { + t.plan(1) + var expectationMet = false + var res = html`` + + raiseEvent(res, 'dragstart') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should not copy ondragstart events', function (t) { + t.plan(1) + var expectationMet = true + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'dragstart') + + function fail (e) { + e.preventDefault() + expectationMet = false + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should copy ondragstart events(html arrtibute)', function (t) { + t.plan(1) + var expectationMet = false + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'dragstart') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should have ondrop events(html attribute) ', function (t) { + t.plan(1) + var expectationMet = false + var res = html`` + + raiseEvent(res, 'drop') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should not copy ondrop events', function (t) { + t.plan(1) + var expectationMet = true + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'drop') + + function fail (e) { + e.preventDefault() + expectationMet = false + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should copy ondrop events(html arrtibute)', function (t) { + t.plan(1) + var expectationMet = false + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'drop') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should have onerror events(html attribute) ', function (t) { + t.plan(1) + var expectationMet = false + var res = html`` + + raiseEvent(res, 'error') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should not copy onerror events', function (t) { + t.plan(1) + var expectationMet = true + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'error') + + function fail (e) { + e.preventDefault() + expectationMet = false + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should copy onerror events(html arrtibute)', function (t) { + t.plan(1) + var expectationMet = false + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'error') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should have onfocus events(html attribute) ', function (t) { + t.plan(1) + var expectationMet = false + var res = html`` + + raiseEvent(res, 'focus') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should not copy onfocus events', function (t) { + t.plan(1) + var expectationMet = true + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'focus') + + function fail (e) { + e.preventDefault() + expectationMet = false + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should copy onfocus events(html arrtibute)', function (t) { + t.plan(1) + var expectationMet = false + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'focus') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should have onfocusin events(html attribute) ', function (t) { + t.plan(1) + var expectationMet = false + var res = html`` + + raiseEvent(res, 'focusin') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should not copy onfocusin events', function (t) { + t.plan(1) + var expectationMet = true + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'focusin') + + function fail (e) { + e.preventDefault() + expectationMet = false + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should copy onfocusin events(html arrtibute)', function (t) { + t.plan(1) + var expectationMet = false + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'focusin') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should have onfocusout events(html attribute) ', function (t) { + t.plan(1) + var expectationMet = false + var res = html`` + + raiseEvent(res, 'focusout') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should not copy onfocusout events', function (t) { + t.plan(1) + var expectationMet = true + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'focusout') + + function fail (e) { + e.preventDefault() + expectationMet = false + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should copy onfocusout events(html arrtibute)', function (t) { + t.plan(1) + var expectationMet = false + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'focusout') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should have oninput events(html attribute) ', function (t) { + t.plan(1) + var expectationMet = false + var res = html`` + + raiseEvent(res, 'input') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should not copy oninput events', function (t) { + t.plan(1) + var expectationMet = true + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'input') + + function fail (e) { + e.preventDefault() + expectationMet = false + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should copy oninput events(html arrtibute)', function (t) { + t.plan(1) + var expectationMet = false + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'input') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should have onkeydown events(html attribute) ', function (t) { + t.plan(1) + var expectationMet = false + var res = html`` + + raiseEvent(res, 'keydown') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should not copy onkeydown events', function (t) { + t.plan(1) + var expectationMet = true + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'keydown') + + function fail (e) { + e.preventDefault() + expectationMet = false + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should copy onkeydown events(html arrtibute)', function (t) { + t.plan(1) + var expectationMet = false + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'keydown') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should have onkeypress events(html attribute) ', function (t) { + t.plan(1) + var expectationMet = false + var res = html`` + + raiseEvent(res, 'keypress') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should not copy onkeypress events', function (t) { + t.plan(1) + var expectationMet = true + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'keypress') + + function fail (e) { + e.preventDefault() + expectationMet = false + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should copy onkeypress events(html arrtibute)', function (t) { + t.plan(1) + var expectationMet = false + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'keypress') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should have onkeyup events(html attribute) ', function (t) { + t.plan(1) + var expectationMet = false + var res = html`` + + raiseEvent(res, 'keyup') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should not copy onkeyup events', function (t) { + t.plan(1) + var expectationMet = true + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'keyup') + + function fail (e) { + e.preventDefault() + expectationMet = false + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should copy onkeyup events(html arrtibute)', function (t) { + t.plan(1) + var expectationMet = false + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'keyup') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should have onmousedown events(html attribute) ', function (t) { + t.plan(1) + var expectationMet = false + var res = html`` + + raiseEvent(res, 'mousedown') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should not copy onmousedown events', function (t) { + t.plan(1) + var expectationMet = true + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'mousedown') + + function fail (e) { + e.preventDefault() + expectationMet = false + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should copy onmousedown events(html arrtibute)', function (t) { + t.plan(1) + var expectationMet = false + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'mousedown') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should have onmouseenter events(html attribute) ', function (t) { + t.plan(1) + var expectationMet = false + var res = html`` + + raiseEvent(res, 'mouseenter') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should not copy onmouseenter events', function (t) { + t.plan(1) + var expectationMet = true + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'mouseenter') + + function fail (e) { + e.preventDefault() + expectationMet = false + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should copy onmouseenter events(html arrtibute)', function (t) { + t.plan(1) + var expectationMet = false + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'mouseenter') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should have onmouseleave events(html attribute) ', function (t) { + t.plan(1) + var expectationMet = false + var res = html`` + + raiseEvent(res, 'mouseleave') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should not copy onmouseleave events', function (t) { + t.plan(1) + var expectationMet = true + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'mouseleave') + + function fail (e) { + e.preventDefault() + expectationMet = false + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should copy onmouseleave events(html arrtibute)', function (t) { + t.plan(1) + var expectationMet = false + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'mouseleave') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should have onmousemove events(html attribute) ', function (t) { + t.plan(1) + var expectationMet = false + var res = html`` + + raiseEvent(res, 'mousemove') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should not copy onmousemove events', function (t) { + t.plan(1) + var expectationMet = true + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'mousemove') + + function fail (e) { + e.preventDefault() + expectationMet = false + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should copy onmousemove events(html arrtibute)', function (t) { + t.plan(1) + var expectationMet = false + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'mousemove') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should have onmouseout events(html attribute) ', function (t) { + t.plan(1) + var expectationMet = false + var res = html`` + + raiseEvent(res, 'mouseout') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should not copy onmouseout events', function (t) { + t.plan(1) + var expectationMet = true + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'mouseout') + + function fail (e) { + e.preventDefault() + expectationMet = false + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should copy onmouseout events(html arrtibute)', function (t) { + t.plan(1) + var expectationMet = false + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'mouseout') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should have onmouseover events(html attribute) ', function (t) { + t.plan(1) + var expectationMet = false + var res = html`` + + raiseEvent(res, 'mouseover') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should not copy onmouseover events', function (t) { + t.plan(1) + var expectationMet = true + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'mouseover') + + function fail (e) { + e.preventDefault() + expectationMet = false + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should copy onmouseover events(html arrtibute)', function (t) { + t.plan(1) + var expectationMet = false + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'mouseover') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should have onmouseup events(html attribute) ', function (t) { + t.plan(1) + var expectationMet = false + var res = html`` + + raiseEvent(res, 'mouseup') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should not copy onmouseup events', function (t) { + t.plan(1) + var expectationMet = true + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'mouseup') + + function fail (e) { + e.preventDefault() + expectationMet = false + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should copy onmouseup events(html arrtibute)', function (t) { + t.plan(1) + var expectationMet = false + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'mouseup') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should have onreset events(html attribute) ', function (t) { + t.plan(1) + var expectationMet = false + var res = html`` + + raiseEvent(res, 'reset') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should not copy onreset events', function (t) { + t.plan(1) + var expectationMet = true + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'reset') + + function fail (e) { + e.preventDefault() + expectationMet = false + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should copy onreset events(html arrtibute)', function (t) { + t.plan(1) + var expectationMet = false + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'reset') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should have onresize events(html attribute) ', function (t) { + t.plan(1) + var expectationMet = false + var res = html`` + + raiseEvent(res, 'resize') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should not copy onresize events', function (t) { + t.plan(1) + var expectationMet = true + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'resize') + + function fail (e) { + e.preventDefault() + expectationMet = false + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should copy onresize events(html arrtibute)', function (t) { + t.plan(1) + var expectationMet = false + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'resize') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should have onscroll events(html attribute) ', function (t) { + t.plan(1) + var expectationMet = false + var res = html`` + + raiseEvent(res, 'scroll') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should not copy onscroll events', function (t) { + t.plan(1) + var expectationMet = true + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'scroll') + + function fail (e) { + e.preventDefault() + expectationMet = false + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should copy onscroll events(html arrtibute)', function (t) { + t.plan(1) + var expectationMet = false + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'scroll') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should have onselect events(html attribute) ', function (t) { + t.plan(1) + var expectationMet = false + var res = html`` + + raiseEvent(res, 'select') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should not copy onselect events', function (t) { + t.plan(1) + var expectationMet = true + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'select') + + function fail (e) { + e.preventDefault() + expectationMet = false + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should copy onselect events(html arrtibute)', function (t) { + t.plan(1) + var expectationMet = false + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'select') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should have onsubmit events(html attribute) ', function (t) { + t.plan(1) + var expectationMet = false + var res = html`` + + raiseEvent(res, 'submit') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should not copy onsubmit events', function (t) { + t.plan(1) + var expectationMet = true + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'submit') + + function fail (e) { + e.preventDefault() + expectationMet = false + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should copy onsubmit events(html arrtibute)', function (t) { + t.plan(1) + var expectationMet = false + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'submit') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should have ontouchcancel events(html attribute) ', function (t) { + t.plan(1) + var expectationMet = false + var res = html`` + + raiseEvent(res, 'touchcancel') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should not copy ontouchcancel events', function (t) { + t.plan(1) + var expectationMet = true + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'touchcancel') + + function fail (e) { + e.preventDefault() + expectationMet = false + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should copy ontouchcancel events(html arrtibute)', function (t) { + t.plan(1) + var expectationMet = false + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'touchcancel') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should have ontouchend events(html attribute) ', function (t) { + t.plan(1) + var expectationMet = false + var res = html`` + + raiseEvent(res, 'touchend') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should not copy ontouchend events', function (t) { + t.plan(1) + var expectationMet = true + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'touchend') + + function fail (e) { + e.preventDefault() + expectationMet = false + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should copy ontouchend events(html arrtibute)', function (t) { + t.plan(1) + var expectationMet = false + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'touchend') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should have ontouchmove events(html attribute) ', function (t) { + t.plan(1) + var expectationMet = false + var res = html`` + + raiseEvent(res, 'touchmove') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should not copy ontouchmove events', function (t) { + t.plan(1) + var expectationMet = true + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'touchmove') + + function fail (e) { + e.preventDefault() + expectationMet = false + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should copy ontouchmove events(html arrtibute)', function (t) { + t.plan(1) + var expectationMet = false + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'touchmove') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should have ontouchstart events(html attribute) ', function (t) { + t.plan(1) + var expectationMet = false + var res = html`` + + raiseEvent(res, 'touchstart') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should not copy ontouchstart events', function (t) { + t.plan(1) + var expectationMet = true + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'touchstart') + + function fail (e) { + e.preventDefault() + expectationMet = false + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should copy ontouchstart events(html arrtibute)', function (t) { + t.plan(1) + var expectationMet = false + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'touchstart') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should have onunload events(html attribute) ', function (t) { + t.plan(1) + var expectationMet = false + var res = html`` + + raiseEvent(res, 'unload') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should not copy onunload events', function (t) { + t.plan(1) + var expectationMet = true + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'unload') + + function fail (e) { + e.preventDefault() + expectationMet = false + } + + t.equal(expectationMet, true, 'result was expected') + }) + t.test('should copy onunload events(html arrtibute)', function (t) { + t.plan(1) + var expectationMet = false + var a = html`` + var b = html`` + var res = morph(a, b) + + raiseEvent(res, 'unload') + + function pass (e) { + e.preventDefault() + expectationMet = true + } + t.equal(expectationMet, true, 'result was expected') }) })