Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

buster-html-doc

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

buster-html-doc - npm Package Compare versions

Comparing version 0.2.1 to 1.0.0

.npmignore

4

lib/html-doc.js

@@ -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");
}
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc