add unit test for enter directive