Details
- Reviewers
Fabien - Group Reviewers
Restricted Project - Commits
- rABCa2a7e4cd33ad: [alias-server] get tipHash and tipHeight on app startup
npm test
Diff Detail
- Repository
- rABC Bitcoin ABC
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
apps/alias-server/src/events.js | ||
---|---|---|
34 ↗ | (On Diff #39427) | |
38 ↗ | (On Diff #39427) | you don't need that yet, but ok |
89 ↗ | (On Diff #39427) | |
95 ↗ | (On Diff #39427) | You don't need these test only strings |
apps/alias-server/test/eventsTests.js | ||
11 ↗ | (On Diff #39427) | that's not what you want to test because this is an implementation detail. You want to check startup causes the aliases to register up to the expected tip |
apps/alias-server/src/events.js | ||
---|---|---|
95 ↗ | (On Diff #39427) | Ultimately they will be changed when the function is complete. For now it's a way to make sure the function is doing what it is supposed to do so far. |
apps/alias-server/test/eventsTests.js | ||
11 ↗ | (On Diff #39427) | For now, the test is designed to test everything the function should do at this stage of app development. The logic to register aliases to expected tip will be added / tested later. The tests will have to be modified as additional logic is added to the function. I'm not sure what the abc best practice is here. Should I just not test the function until it's complete? Verifying that it's doing what is expected at this stage seems like a good way to make incremental progress. |
apps/alias-server/test/eventsTests.js | ||
---|---|---|
11 ↗ | (On Diff #39427) | You're missing my point: the test itself is a good idea, only the execution is wrong. You are changing the behavior of the handleBlockConnected function for the sake of the test and you don't need to. |