buster-html-doc
Advanced tools
Comparing version 0.2.1 to 1.0.0
@@ -19,3 +19,3 @@ function stripCommentDelimiters(comment) { | ||
return "/*" + comment + "*/"; | ||
}; | ||
} | ||
@@ -30,3 +30,3 @@ module.exports = { | ||
var name = pieces.shift().split(/\+?=/).shift().trim(); | ||
var markup = '<'+pieces.join('<'); | ||
var markup = "<" + pieces.join("<"); | ||
@@ -33,0 +33,0 @@ if (name) { |
{ | ||
"name": "buster-html-doc", | ||
"version": "0.2.1", | ||
"version": "1.0.0", | ||
"description": "HTML doc feature (as found in JsTestDriver) as a Buster.JS extension", | ||
"homepage": "http://busterjs.org/docs/html-doc/", | ||
"author": { "name": "August Lilleaas and Christian Johansen" }, | ||
"author": "Christian Johansen", | ||
"contributors": [{ | ||
@@ -12,8 +12,8 @@ "name": "Christian Johansen", | ||
}, { | ||
"name": "August Lilleaas", | ||
"email": "august.lilleaas@gmail.com", | ||
"url": "http://augustl.com" | ||
}, { | ||
"name": "Dominykas Blyžė", | ||
"email": "hello@dominykas.com", | ||
"url": "http://www.dominykas.com" | ||
}, { | ||
"name": "Stein Magnus Jodal", | ||
"email": "stein.magnus@jodal.no" | ||
}], | ||
@@ -23,6 +23,6 @@ "main": "./lib/extension", | ||
"type": "git", | ||
"url": "git://gitorious.org/buster/buster-html-doc.git" | ||
"url": "https://github.com/busterjs/buster-html-doc.git" | ||
}, | ||
"scripts": { | ||
"test": "./node_modules/buster/bin/buster-test" | ||
"test": "node run-tests.js" | ||
}, | ||
@@ -33,6 +33,6 @@ "dependencies": { | ||
"devDependencies": { | ||
"buster": "*", | ||
"jsdom": "~0.2.14", | ||
"buster-configuration": ">=0.5.0" | ||
"buster-node": "0.1", | ||
"jsdom": "~0.5.3", | ||
"buster-configuration": ">=0.6.0" | ||
} | ||
} |
@@ -1,4 +0,5 @@ | ||
var buster = require("buster"); | ||
var buster = require("buster-node"); | ||
var assert = buster.assert; | ||
var ext = require("../lib/extension"); | ||
var config = require("buster-configuration"); | ||
var bc = require("buster-configuration"); | ||
@@ -13,3 +14,3 @@ function process(group, then, errBack) { | ||
setUp: function () { | ||
this.config = config.create(); | ||
this.config = bc.createConfiguration(); | ||
}, | ||
@@ -34,2 +35,1 @@ | ||
}); | ||
@@ -1,2 +0,3 @@ | ||
var buster = require("buster"); | ||
var buster = require("buster-node"); | ||
var assert = buster.assert; | ||
var htmlDoc = require("../lib/html-doc"); | ||
@@ -9,3 +10,4 @@ var vm = require("vm"); | ||
setUp: function () { | ||
var dom = jsdom("<!DOCTYPE html><html><head></head><body></body></html>"); | ||
var dom = jsdom("<!DOCTYPE html><html><head></head>" + | ||
"<body></body></html>"); | ||
this.context = { document: dom.createWindow().document }; | ||
@@ -55,3 +57,4 @@ }, | ||
"ignores superfluous white-space": function () { | ||
var comment = "/*:DOC element \n = \n\n <div></div>\n\n */"; | ||
var comment = "/*:DOC element \n =" + | ||
" \n\n <div></div>\n\n */"; | ||
vm.runInNewContext(htmlDoc.extract(comment), this.context); | ||
@@ -89,3 +92,3 @@ | ||
"throws when attempting to add more than one element to the body": function () { | ||
"throws when attempting to add more than one element": function () { | ||
var comment = "/*:DOC += <div></div><div></div>*/"; | ||
@@ -102,3 +105,4 @@ | ||
assert.equals(this.context.document.body.firstChild.getAttribute("id"), "test"); | ||
var body = this.context.document.body; | ||
assert.equals(body.firstChild.getAttribute("id"), "test"); | ||
}, | ||
@@ -110,4 +114,5 @@ | ||
assert.equals(this.context.document.body.firstChild.getAttribute("data-test"), "test+=test"); | ||
assert.equals(this.context.document.body.firstChild.textContent, "+=+"); | ||
var body = this.context.document.body; | ||
assert.equals(body.firstChild.getAttribute("data-test"), "test+=test"); | ||
assert.equals(body.firstChild.textContent, "+=+"); | ||
}, | ||
@@ -114,0 +119,0 @@ |
@@ -1,2 +0,3 @@ | ||
var buster = require("buster"); | ||
var buster = require("buster-node"); | ||
var assert = buster.assert; | ||
var parser = require("../lib/parser"); | ||
@@ -16,5 +17,6 @@ | ||
"extracts html docs and updates code": function () { | ||
var code = parser.parse("function () { /*:DOC element = <div></div>*/ }"); | ||
var script = "function () { /*:DOC element = <div></div>*/ }"; | ||
var code = parser.parse(script); | ||
assert.match(code, "document.createElement"); | ||
} | ||
}); |
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
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
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
No License Found
License(Experimental) License information could not be found.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
12346
15
0
231
1
25
1