Each of our custome alerts attempts to define its own alert id, which is used to distinguish alert types when you encode alerts out of c++, so that the original types are no longer available. We do this in joystream-node.
Problem
Over time it becomes easy to forget to maintain this, as tests are added and removed, as in #13 .
Solution
Add unit test which simply does runtime check that they are all unique, it could be a nice start to our unit tests. I started on integration tests here https://github.com/JoyStream/extension-cpp/pull/1, but we still have no unit tests.
Background
Each of our custome alerts attempts to define its own alert id, which is used to distinguish alert types when you encode alerts out of c++, so that the original types are no longer available. We do this in
joystream-node
.Problem
Over time it becomes easy to forget to maintain this, as tests are added and removed, as in #13 .
Solution
Add unit test which simply does runtime check that they are all unique, it could be a nice start to our unit tests. I started on integration tests here https://github.com/JoyStream/extension-cpp/pull/1, but we still have no unit tests.