unit tests for core.js