From fb21fe97842061e5aa3a332caa1a1723e6193384 Mon Sep 17 00:00:00 2001 From: Brett Ritter <45160689+brettritter-okta@users.noreply.github.com> Date: Fri, 22 Feb 2019 08:48:00 -0800 Subject: [PATCH] Added test for Buffer fix --- test/builder.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/builder.js b/test/builder.js index a0a33b2..45310d8 100644 --- a/test/builder.js +++ b/test/builder.js @@ -107,6 +107,12 @@ describe('base64 URL Encoding',function(){ ); }); + + it('does not create an uninitialized Buffer', function() { + var fromDigits = nJwt.base64urlEncode(10); + var fromString = nJwt.base64urlEncode('10'); + assert.equal(fromDigits, fromString); + }); });