add unrender and teardown to tests. add detach and insert hooks