Skip to content

Commit 446244a

Browse files
committed
fixup! fixup! lib: runtime deprecate SlowBuffer
1 parent f2fabb9 commit 446244a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/parallel/test-buffer-slow.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
'use strict';
22

3-
require('../common');
3+
const common = require('../common');
44
const assert = require('assert');
55
const buffer = require('buffer');
66
const SlowBuffer = buffer.SlowBuffer;
77

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

10+
common.expectWarning(
11+
'DeprecationWarning',
12+
'SlowBuffer() is deprecated. Please use Buffer.allocUnsafeSlow()',
13+
'DEP0030'
14+
);
15+
1016
// Should create a Buffer
1117
let sb = SlowBuffer(4);
1218
assert(sb instanceof Buffer);

0 commit comments

Comments
 (0)