hashPersonalMessage test fails
Opened this issue · 0 comments
marlonhanks commented
Expected test to pass, instead error produced:
hashPersonalMessage
1) should produce a deterministic hash
isValidSignature
✓ should fail on an invalid signature (shorter r))
✓ should fail on an invalid signature (shorter s))
✓ should fail on an invalid signature (v = 21)
✓ should fail on an invalid signature (v = 29)
✓ should work otherwise
.toChecksumAddress()
✓ should work
.isValidChecksumAddress()
✓ should return true
✓ should validate
.isValidAddress()
✓ should return true
✓ should return false
message sig
✓ should return hex strings that the RPC can use
✓ should throw on invalid length
✓ pad short r and s values
✓ should throw on invalid v value
90 passing (167ms)
1 failing
1) hashPersonalMessage
should produce a deterministic hash:
AssertionError [ERR_ASSERTION]: Expected values to be loosely deep-equal:
Buffer(32) [Uint8Array] [
146,
79,
202,
189,
87,
174,
90,
136,
252,
16,
182,
81,
221,
213,
29,
64,
97,
154,
30,
69,
98,
241,
201,
224,
6,
166,
173,
182,
101,
197,
178,
231
]
should loosely deep-equal
Buffer(32) [Uint8Array] [
129,
68,
166,
250,
38,
190,
37,
43,
134,
69,
100,
145,
251,
205,
67,
193,
222,
126,
2,
34,
65,
132,
95,
254,
161,
195,
223,
6,
111,
124,
254,
222
]
+ expected - actual
[
- 146
- 79
- 202
- 189
- 87
- 174
- 90
- 136
- 252
- 16
- 182
- 81
- 221
- 213
- 29
- 64
- 97
- 154
- 30
+ 129
+ 68
+ 166
+ 250
+ 38
+ 190
+ 37
+ 43
+ 134
69
- 98
- 241
- 201
- 224
+ 100
+ 145
+ 251
+ 205
+ 67
+ 193
+ 222
+ 126
+ 2
+ 34
+ 65
+ 132
+ 95
+ 254
+ 161
+ 195
+ 223
6
- 166
- 173
- 182
- 101
- 197
- 178
- 231
+ 111
+ 124
+ 254
+ 222
]
at Context.<anonymous> (test/index.js:512:12)
at processImmediate (internal/timers.js:461:21)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vaporyjs-util@5.1.5 test:node: `npm run build:dist && istanbul test mocha -- --reporter spec`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vaporyjs-util@5.1.5 test:node script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ceo/.npm/_logs/2021-01-11T07_39_29_612Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vaporyjs-util@5.1.5 test: `npm run test:node && npm run test:browser`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vaporyjs-util@5.1.5 test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ceo/.npm/_logs/2021-01-11T07_39_29_650Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vaporyjs-util@5.1.5 prepublishOnly: `npm run lint && npm run build:dist && npm run test`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vaporyjs-util@5.1.5 prepublishOnly script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ceo/.npm/_logs/2021-01-11T07_39_29_735Z-debug.log
error log:
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/home/ceo/.nvm/versions/node/v12.20.0/bin/node',
1 verbose cli '/home/ceo/.nvm/versions/node/v12.20.0/bin/npm',
1 verbose cli 'publish'
1 verbose cli ]
2 info using npm@6.14.8
3 info using node@v12.20.0
4 verbose npm-session b45ae370e6f451dd
5 verbose publish [ '.' ]
6 info lifecycle vaporyjs-util@5.1.5~prepublish: vaporyjs-util@5.1.5
7 info lifecycle vaporyjs-util@5.1.5~prepare: vaporyjs-util@5.1.5
8 info lifecycle vaporyjs-util@5.1.5~prepublishOnly: vaporyjs-util@5.1.5
9 verbose lifecycle vaporyjs-util@5.1.5~prepublishOnly: unsafe-perm in lifecycle true
10 verbose lifecycle vaporyjs-util@5.1.5~prepublishOnly: PATH: /home/ceo/.nvm/versions/node/v12.20.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/ceo/live/vaporyjs/vaporyjs-util/node_modules/.bin:/home/ceo/live/jav$
11 verbose lifecycle vaporyjs-util@5.1.5~prepublishOnly: CWD: .
12 silly lifecycle vaporyjs-util@5.1.5~prepublishOnly: Args: [ '-c', 'npm run lint && npm run build:dist && npm run test' ]
13 silly lifecycle vaporyjs-util@5.1.5~prepublishOnly: Returned: code: 1 signal: null
14 info lifecycle vaporyjs-util@5.1.5~prepublishOnly: Failed to exec prepublishOnly script
15 verbose stack Error: vaporyjs-util@5.1.5 prepublishOnly: `npm run lint && npm run build:dist && npm run test`
15 verbose stack Exit status 1
15 verbose stack at EventEmitter.<anonymous> (/home/ceo/.nvm/versions/node/v12.20.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
15 verbose stack at EventEmitter.emit (events.js:314:20)
15 verbose stack at ChildProcess.<anonymous> (/home/ceo/.nvm/versions/node/v12.20.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
15 verbose stack at ChildProcess.emit (events.js:314:20)
15 verbose stack at maybeClose (internal/child_process.js:1022:16)
15 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
16 verbose pkgid vaporyjs-util@5.1.5
17 verbose cwd /home/ceo/live/vaporyjs/vaporyjs-util
18 verbose Linux 4.15.0-128-generic
19 verbose argv "/home/ceo/.nvm/versions/node/v12.20.0/bin/node" "/home/ceo/.nvm/versions/node/v12.20.0/bin/npm" "publish"
20 verbose node v12.20.0
21 verbose npm v6.14.8
22 error code ELIFECYCLE
23 error errno 1
24 error vaporyjs-util@5.1.5 prepublishOnly: `npm run lint && npm run build:dist && npm run test`
24 error Exit status 1
25 error Failed at the vaporyjs-util@5.1.5 prepublishOnly script.T