Skip to content

Commit 3cd1b0d

Browse files
committed
Update docdown and qunit-clib.
1 parent 525378a commit 3cd1b0d

File tree

2 files changed

+54
-11
lines changed

2 files changed

+54
-11
lines changed

vendor/docdown/src/DocDown/MarkdownGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ private function addEntries( &$result, $entries ) {
195195
if (count($aliases = $entry->getAliases())) {
196196
array_push($result, '', '#### Aliases');
197197
foreach ($aliases as $index => $alias) {
198-
$aliases[$index] = $alias->getName();
198+
$aliases[$index] = MarkdownGenerator::interpolate('#{member}#{separator}#{name}', $alias);
199199
}
200200
$result[] = '*' . implode(', ', $aliases) . '*';
201201
}

vendor/qunit-clib/qunit-clib.js

Lines changed: 53 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,48 @@
108108

109109
/*------------------------------------------------------------------------*/
110110

111+
/** Used to report the test module for failing tests */
112+
var moduleName,
113+
modulePrinted;
114+
111115
/** Add `console.log()` support for Narwhal, Rhino, and RingoJS */
112116
var console = context.console || (context.console = { 'log': context.print });
113117

118+
/** Used as a horizontal rule in console output */
119+
var hr = '----------------------------------------';
120+
121+
/** Used by `logInline` to clear previously logged messages */
122+
var prevLine = '';
123+
114124
/** Shorten `context.QUnit.QUnit` to `context.QUnit` */
115125
var QUnit = context.QUnit = context.QUnit.QUnit || context.QUnit;
116126

117-
/** Used as a horizontal rule in console output */
118-
var hr = '----------------------------------------';
127+
/**
128+
* Logs an inline message to standard output.
129+
*
130+
* @private
131+
* @param {string} text The text to log.
132+
*/
133+
var logInline = (function() {
134+
// exit early if not Node.js
135+
if (!(typeof process == 'object' && process &&
136+
process.on && process.stdout && process.platform != 'win32')) {
137+
return function() {};
138+
}
139+
// cleanup any inline logs when exited via `ctrl+c`
140+
process.on('SIGINT', function() {
141+
logInline('');
142+
process.exit();
143+
});
144+
return function(text) {
145+
var blankLine = Array(prevLine.length + 1).join(' ');
146+
if (text.length > hr.length) {
147+
text = text.slice(0, hr.length - 3) + '...';
148+
}
149+
prevLine = text;
150+
process.stdout.write(text + blankLine.slice(text.length) + '\r');
151+
}
152+
}());
119153

120154
/**
121155
* A logging callback triggered when all testing is completed.
@@ -133,12 +167,13 @@
133167
}
134168
ran = true;
135169

170+
logInline('');
136171
console.log(hr);
137172
console.log(' PASS: ' + details.passed + ' FAIL: ' + details.failed + ' TOTAL: ' + details.total);
138173
console.log(' Finished in ' + details.runtime + ' milliseconds.');
139174
console.log(hr);
140175

141-
// exit out of Narhwal, Rhino, or Ringo
176+
// exit out of Narhwal, Rhino, or RingoJS
142177
try {
143178
quit();
144179
} catch(e) { }
@@ -186,9 +221,11 @@
186221
* @param {Object} details An object with property `name`.
187222
*/
188223
QUnit.moduleStart(function(details) {
189-
console.log(hr);
190-
console.log(details.name);
191-
console.log(hr);
224+
var newModuleName = details.name;
225+
if (moduleName != newModuleName) {
226+
moduleName = newModuleName;
227+
modulePrinted = false;
228+
}
192229
});
193230

194231
/**
@@ -224,13 +261,19 @@
224261
testName = details.name;
225262

226263
if (details.failed > 0) {
264+
logInline('');
265+
if (!modulePrinted) {
266+
modulePrinted = true;
267+
console.log(hr);
268+
console.log(moduleName);
269+
console.log(hr);
270+
}
227271
console.log(' FAIL - '+ testName);
228272
assertions.forEach(function(value) {
229273
console.log(' ' + value);
230274
});
231-
}
232-
else {
233-
console.log(' PASS - ' + testName);
275+
} else {
276+
logInline('Testing ' + moduleName + '...');
234277
}
235278
assertions.length = 0;
236279
});
@@ -244,7 +287,7 @@
244287
QUnit.config.testStats = {
245288

246289
/**
247-
* An array of test summaries (pipe separated).
290+
* An array of test summaries.
248291
*
249292
* @memberOf QUnit.config.testStats
250293
* @type Array

0 commit comments

Comments
 (0)