add assert.js and fixed some test failures