From ab4e8129d5c94ff96e6c85d0d2b66a04a052b4e5 Mon Sep 17 00:00:00 2001 From: HelenHuang <LinHuang@pollex.com.tw> Date: 星期四, 09 六月 2022 15:26:15 +0800 Subject: [PATCH] TODO#139888 嚴選配對 - 文案修改 --- PAMapp/node_modules/object-inspect/test/bigint.js | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-) diff --git a/PAMapp/node_modules/object-inspect/test/bigint.js b/PAMapp/node_modules/object-inspect/test/bigint.js index 9056435..4ecc31d 100644 --- a/PAMapp/node_modules/object-inspect/test/bigint.js +++ b/PAMapp/node_modules/object-inspect/test/bigint.js @@ -2,7 +2,7 @@ var inspect = require('../'); var test = require('tape'); -var hasSymbols = require('has-symbols/shams')(); +var hasToStringTag = require('has-tostringtag/shams')(); test('bigint', { skip: typeof BigInt === 'undefined' }, function (t) { t.test('primitives', function (st) { @@ -30,7 +30,7 @@ st.equal(inspect(Function('return 256n')()), '256n'); }); - t.test('toStringTag', { skip: !hasSymbols || typeof Symbol.toStringTag === 'undefined' }, function (st) { + t.test('toStringTag', { skip: !hasToStringTag }, function (st) { st.plan(1); var faker = {}; @@ -42,5 +42,17 @@ ); }); + t.test('numericSeparator', function (st) { + st.equal(inspect(BigInt(0), { numericSeparator: false }), '0n', '0n, numericSeparator false'); + st.equal(inspect(BigInt(0), { numericSeparator: true }), '0n', '0n, numericSeparator true'); + + st.equal(inspect(BigInt(1234), { numericSeparator: false }), '1234n', '1234n, numericSeparator false'); + st.equal(inspect(BigInt(1234), { numericSeparator: true }), '1_234n', '1234n, numericSeparator true'); + st.equal(inspect(BigInt(-1234), { numericSeparator: false }), '-1234n', '1234n, numericSeparator false'); + st.equal(inspect(BigInt(-1234), { numericSeparator: true }), '-1_234n', '1234n, numericSeparator true'); + + st.end(); + }); + t.end(); }); -- Gitblit v1.8.0