Add assert function in unit-tests.js