Skip to content

Commit 7976f4e

Browse files
committed
Replace Buffer.from with new Buffer in tests for backward compatability with older versions of node
1 parent 8ded285 commit 7976f4e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/schema.alias.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ describe('schema alias option', function() {
2828
string: 'hello',
2929
number: 1,
3030
date: new Date(),
31-
buffer: Buffer.from('World'),
31+
buffer: new Buffer('World'),
3232
boolean: false,
3333
mixed: [1, [], 'three', { four: 5 }],
3434
objectId: new Schema.Types.ObjectId(),
@@ -73,7 +73,7 @@ describe('schema alias option', function() {
7373
string: 'hello',
7474
number: 1,
7575
date: new Date(),
76-
buffer: Buffer.from('World'),
76+
buffer: new Buffer('World'),
7777
boolean: false,
7878
mixed: [1, [], 'three', { four: 5 }],
7979
objectId: new Schema.Types.ObjectId(),

0 commit comments

Comments
 (0)