chore(test): set up test folder and karma.conf for tests
feat(test): implement tests for functions in lib/