Permalink
Browse files

[tests] added test for unknown errors

  • Loading branch information...
agnat committed Dec 28, 2012
1 parent 6ac2898 commit a1280ab3cf6c362d8560dc5e7a3c402bcd9b7de2
Showing with 4 additions and 4 deletions.
  1. +4 −4 tests/test_dns_sd.js
View
@@ -839,12 +839,12 @@ exports['buildException()'] = function(t) {
t.strictEqual(dns_sd.buildException(dns_sd.kDNSServiceErr_NoError), undefined,
'buildException(kDNSServiceErr_NoError) must return undefined');
- /*
- t.ok(dns_sd.buildException(dns_sd.kDNSServiceErr_Unknwon) instanceof Error,
+ var ex = dns_sd.buildException(dns_sd.kDNSServiceErr_Unknown);
+ t.ok(ex instanceof Error,
'buildException(kDNSServiceErr_Unknwon) must return an Error object');
- */
+ t.strictEqual( ex.errorCode, dns_sd.kDNSServiceErr_Unknown);
- var ex = dns_sd.buildException(dns_sd.kDNSServiceErr_NoSuchName);
+ ex = dns_sd.buildException(dns_sd.kDNSServiceErr_NoSuchName);
t.ok(ex instanceof Error,
'buildException(kDNSServiceErr_NoSuchName) must return an Error object');
t.strictEqual( ex.errorCode, dns_sd.kDNSServiceErr_NoSuchName);

0 comments on commit a1280ab

Please sign in to comment.