added a karma test for clear data functon
added another karma test for clear data functon