Skip to content

Commit

Permalink
fixup! fixup! lib: runtime deprecate SlowBuffer
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelGSS committed Oct 10, 2024
1 parent f2fabb9 commit 446244a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/parallel/test-buffer-slow.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
'use strict';

require('../common');
const common = require('../common');
const assert = require('assert');
const buffer = require('buffer');
const SlowBuffer = buffer.SlowBuffer;

const ones = [1, 1, 1, 1];

common.expectWarning(
'DeprecationWarning',
'SlowBuffer() is deprecated. Please use Buffer.allocUnsafeSlow()',
'DEP0030'
);

// Should create a Buffer
let sb = SlowBuffer(4);
assert(sb instanceof Buffer);
Expand Down

0 comments on commit 446244a

Please sign in to comment.