fastify/avvio

Discrepancy between docs and implementation

coreyfarrell opened this issue · 1 comments

README.md states:
done must be called only once, when your plugin is ready to go.

But the implementation silently suppresses this when it happens.

https://github.com/mcollina/avvio/blob/6d7554cfe4113985609b33e531f60ba72d36edf3/plugin.js#L40-L42

Should we throw an Error here and add a test to verify that a plugin calling done twice throws or should we change the docs and add a test verifying it does not cause any error?

I would keep the current behavior consistent. Fire a PR with the doc change and the test when you have the chance!