Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /usr/local/lib/node_modules/strapi/node_modules/captains-log/test/assertions/ drwxr-xr-x | |
| Viewing file: Select action/file-type: /**
* Module dependencies
*/
var _ = require('@sailshq/lodash');
var assert = require('assert');
/**
* `expect`
*/
function expect() {}
/**
* numWritesToStream
*
* @option {String} streamId [e.g. stderr]
* @option {Finite} numWrites [e.g. 2]
*/
expect.numWritesToStream = function(options) {
return function() {
var history = this.logs[options.streamId];
assert.equal(
history.length,
options.numWrites,
'Unexpected number of writes to ' + options.streamId + ' ' +
'(' + history.length + ' instead of ' + options.numWrites + ').'
// '\n\tWrites:: '+ '[' + history + ']'
);
};
};
/**
* numWrites
*
* @option {Finite} numWrites [e.g. 2]
*/
expect.numWrites = function(options) {
return function() {
var history = [];
_.each(this.logs, function(streamHistory, streamId) {
history = history.concat(streamHistory);
});
assert.equal(
history.length,
options.numWrites,
'Unexpected number of total writes ' +
'(' + history.length + ' instead of ' + options.numWrites + ').'
// '\n\tWrites:: '+ '[' + history + ']'
);
};
};
/**
* equals
*
* @option {String} value [e.g. "My name is Rangor the razorblade, and I have 198 crayons!"]
*/
expect.equals = function(options) {
return function() {
var history = [];
_.each(this.logs, function(streamHistory, streamId) {
history = history.concat(streamHistory);
});
var actualConcatenatedValue = history.join('');
assert.equal(
actualConcatenatedValue,
options.value,
'Unexpected value written to log ' +
'("' + actualConcatenatedValue + '" instead of "' + options.value + '").'
);
};
};
module.exports = expect;
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0217 ]-- |