writing test for chart directive