fixes #21 share the context between hooks and tests