Skip to content
This repository has been archived by the owner on Jan 22, 2020. It is now read-only.

Fix namespace typo in isValidAddress test #113

Merged

Conversation

delventhalz
Copy link
Contributor

Fixes #110

The test that ensured isValidAddress rejected non-hex input used the wrong namespace, which meant it would reject the test address based on namespace before even looking at whether or not it was hex.

To test:

cd code/part-two/processor/
npm install
npm test

All of the tests should pass. Then, if you modify line 121 of code/part-two/processor/services/addressing.js so it reads:

  const pattern = `^${NAMESPACE}[0-9a-z]{64}$`;

The tests should fail correctly. Previously this error would have snuck past the tests.

Fixes hyperledger-archives#110

The test that ensured isValidAddress rejected non-hex input used the
wrong namespace, which meant it would reject the test address based on
namespace before even looking at whether or not it was hex.

Signed-off-by: Zac Delventhal <delventhalz@gmail.com>
@therobinkim
Copy link
Contributor

lgtm -- tested & confirmed working on my end!

@therobinkim therobinkim merged commit dd122a1 into hyperledger-archives:staging Aug 15, 2018
@delventhalz delventhalz deleted the fix-valid-adress-test branch September 14, 2018 15:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants