test.js: Replace all references of `assert.throws`