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
- Branch
- implement-better-mocked-chronik-alias-server
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 23102 Build 45824: Build Diff alias-server-tests Build 45823: arc lint + arc unit
Event Timeline
apps/alias-server/src/events.js | ||
---|---|---|
34 | ||
38 | you don't need that yet, but ok | |
89 | ||
95 | You don't need these test only strings | |
apps/alias-server/test/eventsTests.js | ||
11 | 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 | 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 | 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 | 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. |