moddle-xml
Advanced tools
Comparing version 0.9.0 to 0.9.1
@@ -56,12 +56,2 @@ 'use strict'; | ||
} | ||
}, | ||
jsdoc: { | ||
dist: { | ||
src: [ '<%= config.sources %>/**/*.js' ], | ||
options: { | ||
destination: 'docs/api', | ||
plugins: [ 'plugins/markdown' ] | ||
} | ||
} | ||
} | ||
@@ -75,3 +65,3 @@ }); | ||
grunt.registerTask('default', [ 'jshint', 'test', 'jsdoc' ]); | ||
grunt.registerTask('default', [ 'jshint', 'test' ]); | ||
}; |
@@ -48,2 +48,6 @@ 'use strict'; | ||
if (p.isVirtual) { | ||
return false; | ||
} | ||
// do not serialize defaults | ||
@@ -50,0 +54,0 @@ if (!element.hasOwnProperty(name)) { |
{ | ||
"name": "moddle-xml", | ||
"version": "0.9.0", | ||
"version": "0.9.1", | ||
"description": "XML import/export for documents described with moddle", | ||
@@ -46,3 +46,2 @@ "directories": { | ||
"grunt-contrib-watch": "~0.5.0", | ||
"grunt-jsdoc": "~0.5.1", | ||
"grunt-mocha-test": "^0.12.4", | ||
@@ -49,0 +48,0 @@ "grunt-release": "^0.7.0", |
@@ -20,8 +20,6 @@ 'use strict'; | ||
var model = createModel([ 'properties' ]); | ||
var extendedModel = createModel([ 'properties', 'properties-extended' ]); | ||
describe('base', function() { | ||
var model = createModel([ 'properties' ]); | ||
describe('base', function() { | ||
it('should write xml preamble', function() { | ||
@@ -209,2 +207,4 @@ // given | ||
var model = createModel([ 'properties' ]); | ||
it('with line breaks', function() { | ||
@@ -231,2 +231,4 @@ | ||
var model = createModel([ 'properties' ]); | ||
it('attribute', function() { | ||
@@ -334,2 +336,6 @@ | ||
var model = createModel([ 'properties' ]); | ||
var extendedModel = createModel([ 'properties', 'properties-extended' ]); | ||
it('single', function() { | ||
@@ -375,2 +381,3 @@ | ||
it('collection', function() { | ||
@@ -446,4 +453,29 @@ | ||
describe('virtual properties', function() { | ||
var model = createModel([ 'virtual' ]); | ||
it('should not serialize virtual property', function() { | ||
// given | ||
var writer = createWriter(model); | ||
var root = model.create('virt:Root', { | ||
child: model.create('virt:Child') | ||
}); | ||
// when | ||
var xml = writer.toXML(root); | ||
// then | ||
expect(xml).to.eql( | ||
'<virt:Root xmlns:virt="http://virtual" />'); | ||
}); | ||
}); | ||
describe('body text', function() { | ||
var model = createModel([ 'properties' ]); | ||
it('write body text property', function() { | ||
@@ -514,2 +546,6 @@ | ||
var model = createModel([ 'properties' ]); | ||
var noAliasModel = createModel(['noalias']); | ||
it('lowerCase', function() { | ||
@@ -533,4 +569,2 @@ | ||
// given | ||
var noAliasModel = createModel(['noalias']); | ||
var writer = createWriter(noAliasModel); | ||
@@ -551,2 +585,5 @@ | ||
var model = createModel([ 'properties' ]); | ||
var extendedModel = createModel([ 'properties', 'properties-extended' ]); | ||
it('single package', function() { | ||
@@ -667,2 +704,4 @@ | ||
var model = createModel([ 'properties' ]); | ||
it('single', function() { | ||
@@ -669,0 +708,0 @@ |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
118719
9
29
3390
0