Commit f6bd3b2 1 parent 82e6c33 commit f6bd3b2 Copy full SHA for f6bd3b2
File tree 1 file changed +12
-2
lines changed
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -43,11 +43,21 @@ dns.promises.lookup(fixture.hostname).then(({ address }) => {
43
43
} ) . finally ( mustCall ( ) ) ;
44
44
45
45
dns . resolve4 ( fixture . hostname , mustCall ( ( err , addresses ) => {
46
+ if ( err && err . errno === 'ESERVFAIL' ) {
47
+ assert . ok ( err . message . includes ( 'queryA ESERVFAIL straße.de' ) ) ;
48
+ return ;
49
+ }
46
50
assert . ifError ( err ) ;
47
51
assert . deepStrictEqual ( addresses , [ fixture . expectedAddress ] ) ;
48
52
} ) ) ;
49
53
50
54
const p = new dns . promises . Resolver ( ) . resolve4 ( fixture . hostname ) ;
51
- p . then ( mustCall ( ( addresses ) => {
55
+ p . then ( ( addresses ) => {
52
56
assert . deepStrictEqual ( addresses , [ fixture . expectedAddress ] ) ;
53
- } ) ) ;
57
+ } , ( err ) => {
58
+ if ( err && err . errno === 'ESERVFAIL' ) {
59
+ assert . ok ( err . message . includes ( 'queryA ESERVFAIL straße.de' ) ) ;
60
+ } else {
61
+ throw err ;
62
+ }
63
+ } ) . finally ( mustCall ( ) ) ;
You can’t perform that action at this time.
0 commit comments