test declare and update directive