added new tests for link and delink to test.js