A suite to track Project Diva score statistics and ratings / D4DJ event data.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
projectdivar/server/node_modules/xmldom/test/parse-element.js

31 lines
1.8 KiB

var wows = require('vows');
var assert = require('assert');
var DOMParser = require('xmldom').DOMParser;
var XMLSerializer = require('xmldom').XMLSerializer;
var parser = new DOMParser();
// Create a Test Suite
wows.describe('XML Node Parse').addBatch({
'noAttribute': function () {
var dom = new DOMParser().parseFromString('<xml ></xml>','text/xml');
var dom = new DOMParser().parseFromString('<xml></xml>','text/xml');
var dom = new DOMParser().parseFromString('<xml />','text/xml');
var dom = new DOMParser().parseFromString('<xml/>','text/xml');
var dom = new DOMParser().parseFromString('<xml/>','text/xml');
},
'simpleAttribute': function () {
var dom = new DOMParser().parseFromString('<xml a="1" b="2"></xml>','text/xml');
var dom = new DOMParser().parseFromString('<xml a="1" b="2" ></xml>','text/xml');
var dom = new DOMParser().parseFromString('<xml a="1" b=\'\'></xml>','text/xml');
var dom = new DOMParser().parseFromString('<xml a="1" b=\'\' ></xml>','text/xml');
var dom = new DOMParser().parseFromString('<xml a="1" b="2/">','text/xml');
var dom = new DOMParser().parseFromString('<xml a="1" b="2" />','text/xml');
var dom = new DOMParser().parseFromString('<xml a="1" b=\'\'/>','text/xml');
var dom = new DOMParser().parseFromString('<xml a="1" b=\'\' />','text/xml');
},
'nsAttribute': function () {
var dom = new DOMParser().parseFromString('<xml xmlns="1" xmlns:a="2" a:test="3"></xml>','text/xml');
var dom = new DOMParser().parseFromString('<xml xmlns="1" xmlns:a="2" a:test="3" ></xml>','text/xml');
var dom = new DOMParser().parseFromString('<xml xmlns="1" xmlns:a="2" a:test="3/">','text/xml');
var dom = new DOMParser().parseFromString('<xml xmlns="1" xmlns:a="2" a:test="3" />','text/xml');
}
}).run();