Skip to content

Commit

Permalink
fix(test): linting error in domain_metadata tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mbroadst committed Dec 15, 2015
1 parent 1d9dd65 commit e9210fb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jshint:
fixjsstyle:
fixjsstyle -r lib -r test --strict --jslint_error=all

test:
test: jshint
@if [ "$$GREP" ]; then \
make jshint && $(NPM_BIN)/mocha --globals setImmediate,clearImmediate --check-leaks --colors -t 10000 --reporter $(REPORTER) -g "$$GREP" $(TESTS); \
$(NPM_BIN)/mocha --globals setImmediate,clearImmediate --check-leaks --colors -t 10000 --reporter $(REPORTER) -g "$$GREP" $(TESTS); \
else \
make jshint && $(NPM_BIN)/mocha --globals setImmediate,clearImmediate --check-leaks --colors -t 10000 --reporter $(REPORTER) $(TESTS); \
$(NPM_BIN)/mocha --globals setImmediate,clearImmediate --check-leaks --colors -t 10000 --reporter $(REPORTER) $(TESTS); \
fi

.PHONY: jshint fixjsstyle test
8 changes: 4 additions & 4 deletions test/domain_metadata.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var libvirt = require('../lib'),
semver = require('semver'),
expect = require('chai').expect,
xpath = require('xpath'),
dom = require('xmldom').DOMParser;
Dom = require('xmldom').DOMParser;

var test = {};

Expand Down Expand Up @@ -39,7 +39,7 @@ function getMetadataFromXml(test, callback) {
if (err) {
callback(err);
} else {
var doc = new dom().parseFromString(xml);
var doc = new Dom().parseFromString(xml);
var nodes = xpath.select("//metadata/*", doc);
expect(nodes.length).to.be.below(2);
xml = nodes.length === 1 ? nodes[0].toString() : undefined;
Expand Down Expand Up @@ -119,14 +119,14 @@ describe('Domain', function() {
}
);
});

it('should rewrite domain element metadata', function(done) {
if (semver.lt(test.version, '0.9.10')) { return done(); }
var metadata2 = h.fixture("metadata2.xml");
metadata2 = metadata2.trim();
var metadata2_ns = h.fixture("metadata2_ns.xml");
metadata2_ns = metadata2_ns.trim();
test.domain.setMetadata(libvirt.VIR_DOMAIN_METADATA_ELEMENT, metadata2, "blurb", "http://herp.derp/", 0,
test.domain.setMetadata(libvirt.VIR_DOMAIN_METADATA_ELEMENT, metadata2, "blurb", "http://herp.derp/", 0,
function(err) {
expect(err).to.not.exist;
verifyMetadata(test, metadata2, metadata2_ns, "http://herp.derp/", done);
Expand Down

0 comments on commit e9210fb

Please sign in to comment.