unit test of core.js