]> zoso.dev Git - buffer.git/commitdiff
Reset INSPECT_MAX_BYTES after buffer-inspect test.
authorRenée Kooi <renee@kooi.me>
Wed, 20 Jun 2018 12:05:19 +0000 (14:05 +0200)
committerRenée Kooi <renee@kooi.me>
Wed, 20 Jun 2018 12:05:19 +0000 (14:05 +0200)
test/node/test-buffer-inspect.js

index 477d6bad83965260b10103469129a74cbfe3fe28..8c404335adcb30369ee23f123ba7b945326de6ea 100644 (file)
@@ -27,6 +27,7 @@ const assert = require('assert');
 const util = require('util');
 const buffer = require('../../');
 
+var defaultMaxBytes = buffer.INSPECT_MAX_BYTES;
 buffer.INSPECT_MAX_BYTES = 2;
 
 let b = Buffer.allocUnsafe(4);
@@ -58,3 +59,5 @@ assert.strictEqual(util.inspect(s), expected);
 
 b.inspect = undefined;
 assert.strictEqual(util.inspect(b), expected);
+
+buffer.INSPECT_MAX_BYTES = defaultMaxBytes;