Add some unit tests for background.js