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 #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:
All of the tests should pass. Then, if you modify line 121 of
code/part-two/processor/services/addressing.js
so it reads:The tests should fail correctly. Previously this error would have snuck past the tests.