mobiledoc-dom-renderer
Advanced tools
Comparing version 0.1.15 to 0.1.16
@@ -68,4 +68,7 @@ define('mobiledoc-dom-renderer/cards/image', ['exports', 'mobiledoc-dom-renderer/utils'], function (exports, _mobiledocDomRendererUtils) { | ||
/** | ||
* @param mobiledoc | ||
* @param rootElement optional, defaults to an empty div | ||
* @param {Mobiledoc} mobiledoc | ||
* @param {DOMNode} [rootElement] defaults to an empty div | ||
* @param {Object} [cards] Each top-level property on the object is considered | ||
* to be a card's name, its value is an object with `setup` and (optional) `teardown` | ||
* properties | ||
* @return DOMNode | ||
@@ -88,2 +91,7 @@ */ | ||
this.markerTypes = markerTypes; | ||
if (Array.isArray(cards)) { | ||
throw new Error('`cards` must be passed as an object, not an array.'); | ||
} | ||
this.cards = cards; | ||
@@ -266,2 +274,2 @@ setDefaultCards(this.cards); | ||
} | ||
}); | ||
});//# sourceMappingURL=mobiledoc-dom-renderer.map |
@@ -53,4 +53,7 @@ "use strict"; | ||
/** | ||
* @param mobiledoc | ||
* @param rootElement optional, defaults to an empty div | ||
* @param {Mobiledoc} mobiledoc | ||
* @param {DOMNode} [rootElement] defaults to an empty div | ||
* @param {Object} [cards] Each top-level property on the object is considered | ||
* to be a card's name, its value is an object with `setup` and (optional) `teardown` | ||
* properties | ||
* @return DOMNode | ||
@@ -73,2 +76,7 @@ */ | ||
this.markerTypes = markerTypes; | ||
if (Array.isArray(cards)) { | ||
throw new Error('`cards` must be passed as an object, not an array.'); | ||
} | ||
this.cards = cards; | ||
@@ -75,0 +83,0 @@ setDefaultCards(this.cards); |
@@ -268,4 +268,7 @@ ;(function() { | ||
/** | ||
* @param mobiledoc | ||
* @param rootElement optional, defaults to an empty div | ||
* @param {Mobiledoc} mobiledoc | ||
* @param {DOMNode} [rootElement] defaults to an empty div | ||
* @param {Object} [cards] Each top-level property on the object is considered | ||
* to be a card's name, its value is an object with `setup` and (optional) `teardown` | ||
* properties | ||
* @return DOMNode | ||
@@ -288,2 +291,7 @@ */ | ||
this.markerTypes = markerTypes; | ||
if (Array.isArray(cards)) { | ||
throw new Error('`cards` must be passed as an object, not an array.'); | ||
} | ||
this.cards = cards; | ||
@@ -468,2 +476,2 @@ setDefaultCards(this.cards); | ||
require("mobiledoc-dom-renderer")["registerGlobal"](window, document); | ||
})(); | ||
})();//# sourceMappingURL=mobiledoc-dom-renderer.map |
@@ -1,24 +0,24 @@ | ||
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/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'); | ||
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/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/index.js should pass jshint', function() { | ||
ok(true, 'tests/jshint/index.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/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/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'); | ||
test('tests/jshint/utils.js should pass jshint', function() { | ||
ok(true, 'tests/jshint/utils.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.'); | ||
}); | ||
@@ -190,2 +190,15 @@ | ||
test('when passed an array of cards, throws', function (assert) { | ||
var mobiledoc = { | ||
version: MOBILEDOC_VERSION, | ||
sections: [[], []] | ||
}; | ||
var cards = [{ name: 'test-card' }]; | ||
var element = document.createElement('div'); | ||
assert.throws(function () { | ||
renderer.render(mobiledoc, element, cards); | ||
}, /cards.*must be passed as an object/); | ||
}); | ||
test('renders a mobiledoc with default image section', function (assert) { | ||
@@ -192,0 +205,0 @@ assert.expect(3); |
@@ -34,4 +34,7 @@ import { | ||
/** | ||
* @param mobiledoc | ||
* @param rootElement optional, defaults to an empty div | ||
* @param {Mobiledoc} mobiledoc | ||
* @param {DOMNode} [rootElement] defaults to an empty div | ||
* @param {Object} [cards] Each top-level property on the object is considered | ||
* to be a card's name, its value is an object with `setup` and (optional) `teardown` | ||
* properties | ||
* @return DOMNode | ||
@@ -43,2 +46,7 @@ */ | ||
this.markerTypes = markerTypes; | ||
if (Array.isArray(cards)) { | ||
throw new Error('`cards` must be passed as an object, not an array.'); | ||
} | ||
this.cards = cards; | ||
@@ -45,0 +53,0 @@ setDefaultCards(this.cards); |
{ | ||
"name": "mobiledoc-dom-renderer", | ||
"version": "0.1.15", | ||
"version": "0.1.16", | ||
"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
197528
22
5028