From: Volker Mische Date: Fri, 19 Jan 2018 00:10:01 +0000 (+0100) Subject: Add `printSkipMessage()` stub X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=34d49a3db34a5cf69daa6535335ffea0fdfb66e2;p=buffer.git Add `printSkipMessage()` stub We don't want to print anything, hence `printSkipMessage()` is just a no-op to make the tests without changes pass. --- diff --git a/test/common.js b/test/common.js index fec2d19..c71f42b 100644 --- a/test/common.js +++ b/test/common.js @@ -83,6 +83,8 @@ function _mustCallInner(fn, criteria = 1, field) { }; } +exports.printSkipMessage = function(msg) {} + // Useful for testing expected internal/error objects exports.expectsError = function expectsError(fn, settings, exact) { if (typeof fn !== 'function') { diff --git a/test/node/test-buffer-alloc.js b/test/node/test-buffer-alloc.js index a4eee73..d346521 100644 --- a/test/node/test-buffer-alloc.js +++ b/test/node/test-buffer-alloc.js @@ -915,7 +915,7 @@ common.expectsError( assert.strictEqual(c[i], i); } } -/* + if (common.hasCrypto) { // eslint-disable-line crypto-check // Test truncation after decode var crypto = require('crypto'); @@ -930,7 +930,7 @@ if (common.hasCrypto) { // eslint-disable-line crypto-check } else { common.printSkipMessage('missing crypto'); } - +/* var ps = Buffer.poolSize; Buffer.poolSize = 0; assert(Buffer.allocUnsafe(1).parent instanceof ArrayBuffer);