From: Chris Duncan Date: Wed, 16 Sep 2026 07:18:27 +0000 (-0700) Subject: Fix test string modification. X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=4c6065bd4c8ec4d55755eca02219fdc6a5a682fa;p=nano25519.git Fix test string modification. --- diff --git a/test/node.mjs b/test/node.mjs index 5cf43de..db3d7d8 100644 --- a/test/node.mjs +++ b/test/node.mjs @@ -35,7 +35,7 @@ passes += +test failures += +!test try { - result = derive(NANO_ORG_VECTOR.privateKey.slice(-1) + 'z') + result = derive(NANO_ORG_VECTOR.privateKey.slice(0, -1) + 'z') result = false } catch (err) { if (err != null && typeof err === 'object' && 'message' in err) { @@ -45,7 +45,7 @@ try { } } test = result === true -check(`private key string invalid character ${NANO_ORG_VECTOR.privateKey.slice(-1) + 'z'}`, test) +check(`private key string invalid character ${NANO_ORG_VECTOR.privateKey.slice(0, -1) + 'z'}`, test) passes += +test failures += +!test