blob: 0a828f3357c9ccdec8f1376add25450ca4e7b294 [file] [log] [blame]
<!DOCTYPE html>
<title>error_test.html</title>
<script src="test_bootstrap.js"></script>
<script>
goog.require('bot.Error');
goog.require('bot.ErrorCode');
goog.require('goog.testing.jsunit');
</script>
<script>
function testConvertsCodeToState() {
var e = new bot.Error(bot.ErrorCode.NO_SUCH_ELEMENT, 'boom');
assertEquals(bot.ErrorCode.NO_SUCH_ELEMENT, e.code);
assertEquals(bot.Error.State.NO_SUCH_ELEMENT, e.state);
assertEquals('NoSuchElementError', e.name);
}
</script>