diff --git a/test/tests/creation_date.js b/test/tests/creation_date.js index 8048fbd..ca813f1 100644 --- a/test/tests/creation_date.js +++ b/test/tests/creation_date.js @@ -8,7 +8,7 @@ exports['test creation date'] = function (assert, cb) { sources = {'dummy': ''}, result = jsxgettext.generate(sources, opts); - var parsed = gettextParser.po.parse(new Buffer(result)); + var parsed = gettextParser.po.parse(Buffer.from(result)); var timestamp = parsed.headers["pot-creation-date"].match(/(\d{4}-\d{2}-\d{2} \d{2}:\d{2}[+-]\d{4})/)[1]; assert.ok(timestamp.length > 0, 'Valid timestamp'); // Timestamp should be at most 2 minutes in the past since it is truncated to minute diff --git a/test/tests/po_custom_headers.js b/test/tests/po_custom_headers.js index b20571b..a6476e4 100644 --- a/test/tests/po_custom_headers.js +++ b/test/tests/po_custom_headers.js @@ -11,7 +11,7 @@ exports['test po custom headers'] = function (assert, cb) { }, sources = {'dummy': ''}, result = jsxgettext.generate(sources, opts), - parsed = gettextParser.po.parse(new Buffer(result)); + parsed = gettextParser.po.parse(Buffer.from(result)); var headerCustom = { "project-id-version": "MyProject 1.0", diff --git a/test/tests/po_header.js b/test/tests/po_header.js index ad3da19..f0e2d0c 100644 --- a/test/tests/po_header.js +++ b/test/tests/po_header.js @@ -7,7 +7,7 @@ exports['test po header'] = function (assert, cb) { var opts = {}, sources = {'dummy': ''}, result = jsxgettext.generate(sources, opts), - parsed = gettextParser.po.parse(new Buffer(result)); + parsed = gettextParser.po.parse(Buffer.from(result)); var headerDefaults = { "project-id-version": "PACKAGE VERSION",