Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
test: test each block in addon.md contains js & cc
Allows more freedom in adding additional headings to addon.markdown,
otherwise it'll try and convert each block under a heading to a test
case. We need to have at least a .js and a .cc in order to have
something to test.

Fixes regression caused by adding a new 3rd-level heading in
d5863bc
  • Loading branch information
rvagg committed Dec 24, 2015
commit 2452633b2e92f005222f6a4e34db814d6f8c0310
7 changes: 7 additions & 0 deletions tools/doc/addon-verify.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,20 @@ function once(fn) {
function verifyFiles(files, onprogress, ondone) {
var dir = path.resolve(verifyDir, 'doc-' + id++);

// must have a .cc and a .js to be a valid test
if (!Object.keys(files).some((name) => /\.cc$/.test(name)) ||
!Object.keys(files).some((name) => /\.js$/.test(name))) {
return;
}

files = Object.keys(files).map(function(name) {
return {
path: path.resolve(dir, name),
name: name,
content: files[name]
};
});

files.push({
path: path.resolve(dir, 'binding.gyp'),
content: JSON.stringify({
Expand Down