mobiledoc-dom-renderer
Advanced tools
Comparing version 0.1.12 to 0.1.13
@@ -177,2 +177,5 @@ define('mobiledoc-dom-renderer/cards/image', ['exports', 'mobiledoc-dom-renderer/utils'], function (exports, _mobiledocDomRendererUtils) { | ||
} | ||
if (!payload) { | ||
payload = {}; | ||
} | ||
var element = (0, _mobiledocDomRendererUtils.createElement)('div'); | ||
@@ -262,2 +265,2 @@ card.display.setup(element, {}, { name: name }, payload); | ||
} | ||
});//# sourceMappingURL=mobiledoc-dom-renderer.map | ||
}); |
@@ -377,2 +377,5 @@ ;(function() { | ||
} | ||
if (!payload) { | ||
payload = {}; | ||
} | ||
var element = (0, _mobiledocDomRendererUtils.createElement)('div'); | ||
@@ -464,2 +467,2 @@ card.display.setup(element, {}, { name: name }, payload); | ||
require("mobiledoc-dom-renderer")["registerGlobal"](window, document); | ||
})();//# sourceMappingURL=mobiledoc-dom-renderer.map | ||
})(); |
@@ -1,24 +0,24 @@ | ||
QUnit.module('JSHint - tests/jshint/cards'); | ||
QUnit.test('tests/jshint/cards/image.js should pass jshint', function(assert) { | ||
assert.ok(true, 'tests/jshint/cards/image.js should pass jshint.'); | ||
module('JSHint - tests/jshint/cards'); | ||
test('tests/jshint/cards/image.js should pass jshint', function() { | ||
ok(true, 'tests/jshint/cards/image.js should pass jshint.'); | ||
}); | ||
QUnit.module('JSHint - tests/jshint'); | ||
QUnit.test('tests/jshint/dom-renderer.js should pass jshint', function(assert) { | ||
assert.ok(true, 'tests/jshint/dom-renderer.js should pass jshint.'); | ||
module('JSHint - tests/jshint'); | ||
test('tests/jshint/dom-renderer.js should pass jshint', function() { | ||
ok(true, 'tests/jshint/dom-renderer.js should pass jshint.'); | ||
}); | ||
QUnit.module('JSHint - tests/jshint'); | ||
QUnit.test('tests/jshint/index.js should pass jshint', function(assert) { | ||
assert.ok(true, 'tests/jshint/index.js should pass jshint.'); | ||
module('JSHint - tests/jshint'); | ||
test('tests/jshint/index.js should pass jshint', function() { | ||
ok(true, 'tests/jshint/index.js should pass jshint.'); | ||
}); | ||
QUnit.module('JSHint - tests/jshint/unit'); | ||
QUnit.test('tests/jshint/unit/dom-renderer-test.js should pass jshint', function(assert) { | ||
assert.ok(true, 'tests/jshint/unit/dom-renderer-test.js should pass jshint.'); | ||
module('JSHint - tests/jshint/unit'); | ||
test('tests/jshint/unit/dom-renderer-test.js should pass jshint', function() { | ||
ok(true, 'tests/jshint/unit/dom-renderer-test.js should pass jshint.'); | ||
}); | ||
QUnit.module('JSHint - tests/jshint'); | ||
QUnit.test('tests/jshint/utils.js should pass jshint', function(assert) { | ||
assert.ok(true, 'tests/jshint/utils.js should pass jshint.'); | ||
module('JSHint - tests/jshint'); | ||
test('tests/jshint/utils.js should pass jshint', function() { | ||
ok(true, 'tests/jshint/utils.js should pass jshint.'); | ||
}); | ||
@@ -165,2 +165,27 @@ | ||
test('renders a mobiledoc with card section and no payload', function (assert) { | ||
assert.expect(3); | ||
var cardName = 'title-card'; | ||
var TitleCard = { | ||
name: cardName, | ||
display: { | ||
setup: function setup(element, options, env, setupPayload) { | ||
assert.deepEqual({}, setupPayload); | ||
element.innerHTML = ''; | ||
} | ||
} | ||
}; | ||
var mobiledoc = { | ||
version: MOBILEDOC_VERSION, | ||
sections: [[], // markers | ||
[// sections | ||
[10, cardName]]] | ||
}; | ||
var rendered = renderer.render(mobiledoc, document.createElement('div'), _defineProperty({}, cardName, TitleCard)); | ||
assert.equal(rendered.childNodes.length, 1, 'renders 1 section'); | ||
var sectionEl = rendered.childNodes[0]; | ||
assert.equal(sectionEl.innerHTML, ''); | ||
}); | ||
test('renders a mobiledoc with default image section', function (assert) { | ||
@@ -167,0 +192,0 @@ assert.expect(3); |
@@ -100,2 +100,5 @@ import { | ||
} | ||
if (!payload) { | ||
payload = {}; | ||
} | ||
let element = createElement('div'); | ||
@@ -102,0 +105,0 @@ card.display.setup(element, {}, {name}, payload); |
{ | ||
"name": "mobiledoc-dom-renderer", | ||
"version": "0.1.12", | ||
"version": "0.1.13", | ||
"description": "Renders Mobiledoc input to DOM output", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
165335
16
4697