@@ -32,8 +32,8 @@ describe('GSSAPI', () => {
3232 } ) ;
3333 expect ( host ) . to . equal ( hostName ) ;
3434 expect ( dns . lookup ) . to . not . be . called ;
35- expect ( dns . resolve . withArgs ( sinon . match . any , 'PTR' ) ) . to . not . be . called ;
36- expect ( dns . resolve . withArgs ( sinon . match . any , 'CNAME' ) ) . to . not . be . called ;
35+ expect ( dns . resolve . withArgs ( sinon . match . string , 'PTR' ) ) . to . not . be . called ;
36+ expect ( dns . resolve . withArgs ( sinon . match . string , 'CNAME' ) ) . to . not . be . called ;
3737 } ) ;
3838 } ) ;
3939 }
@@ -43,7 +43,7 @@ describe('GSSAPI', () => {
4343
4444 beforeEach ( ( ) => {
4545 resolveSpy . restore ( ) ;
46- sinon . stub ( dns , 'resolve' ) . withArgs ( sinon . match . any , 'CNAME' ) . resolves ( [ resolved ] ) ;
46+ sinon . stub ( dns , 'resolve' ) . withArgs ( sinon . match . string , 'CNAME' ) . resolves ( [ resolved ] ) ;
4747 } ) ;
4848
4949 it ( 'performs a cname lookup' , async ( ) => {
@@ -52,7 +52,7 @@ describe('GSSAPI', () => {
5252 } ) ;
5353 expect ( host ) . to . equal ( resolved ) ;
5454 expect ( dns . lookup ) . to . not . be . called ;
55- expect ( dns . resolve . withArgs ( sinon . match . any , 'PTR' ) ) . to . not . be . called ;
55+ expect ( dns . resolve . withArgs ( sinon . match . string , 'PTR' ) ) . to . not . be . called ;
5656 expect ( dns . resolve ) . to . be . calledOnceWith ( hostName , 'CNAME' ) ;
5757 } ) ;
5858 } ) ;
@@ -73,7 +73,7 @@ describe('GSSAPI', () => {
7373 lookupSpy . restore ( ) ;
7474 resolveSpy . restore ( ) ;
7575 sinon . stub ( dns , 'lookup' ) . resolves ( lookedUp ) ;
76- sinon . stub ( dns , 'resolve' ) . withArgs ( sinon . match . any , 'PTR' ) . resolves ( [ resolved ] ) ;
76+ sinon . stub ( dns , 'resolve' ) . withArgs ( sinon . match . string , 'PTR' ) . resolves ( [ resolved ] ) ;
7777 } ) ;
7878
7979 it ( 'uses the reverse lookup host' , async ( ) => {
@@ -96,7 +96,7 @@ describe('GSSAPI', () => {
9696 sinon . stub ( dns , 'lookup' ) . resolves ( lookedUp ) ;
9797 sinon
9898 . stub ( dns , 'resolve' )
99- . withArgs ( sinon . match . any , 'PTR' )
99+ . withArgs ( sinon . match . string , 'PTR' )
100100 . resolves ( [ resolved , 'example.com' ] ) ;
101101 } ) ;
102102
@@ -107,7 +107,7 @@ describe('GSSAPI', () => {
107107 expect ( host ) . to . equal ( resolved ) ;
108108 expect ( dns . lookup ) . to . be . calledOnceWith ( hostName ) ;
109109 expect ( dns . resolve ) . to . be . calledOnceWith ( lookedUp . address , 'PTR' ) ;
110- expect ( dns . resolve ) . to . not . be . calledOnceWith ( sinon . match . any , 'CNAME' ) ;
110+ expect ( dns . resolve ) . to . not . be . calledOnceWith ( sinon . match . string , 'CNAME' ) ;
111111 } ) ;
112112 } ) ;
113113 } ) ;
@@ -120,8 +120,8 @@ describe('GSSAPI', () => {
120120 resolveSpy . restore ( ) ;
121121 sinon . stub ( dns , 'lookup' ) . resolves ( lookedUp ) ;
122122 const stub = sinon . stub ( dns , 'resolve' ) ;
123- stub . withArgs ( sinon . match . any , 'PTR' ) . rejects ( new Error ( 'failed' ) ) ;
124- stub . withArgs ( sinon . match . any , 'CNAME' ) . resolves ( [ cname ] ) ;
123+ stub . withArgs ( sinon . match . string , 'PTR' ) . rejects ( new Error ( 'failed' ) ) ;
124+ stub . withArgs ( sinon . match . string , 'CNAME' ) . resolves ( [ cname ] ) ;
125125 } ) ;
126126
127127 it ( 'falls back to a cname lookup' , async ( ) => {
@@ -141,7 +141,7 @@ describe('GSSAPI', () => {
141141 lookupSpy . restore ( ) ;
142142 resolveSpy . restore ( ) ;
143143 sinon . stub ( dns , 'lookup' ) . resolves ( lookedUp ) ;
144- sinon . stub ( dns , 'resolve' ) . withArgs ( sinon . match . any , 'PTR' ) . resolves ( [ ] ) ;
144+ sinon . stub ( dns , 'resolve' ) . withArgs ( sinon . match . string , 'PTR' ) . resolves ( [ ] ) ;
145145 } ) ;
146146
147147 it ( 'uses the provided host' , async ( ) => {
@@ -151,7 +151,7 @@ describe('GSSAPI', () => {
151151 expect ( host ) . to . equal ( hostName ) ;
152152 expect ( dns . lookup ) . to . be . calledOnceWith ( hostName ) ;
153153 expect ( dns . resolve ) . to . be . calledOnceWith ( lookedUp . address , 'PTR' ) ;
154- expect ( dns . resolve ) . to . not . be . calledWith ( sinon . match . any , 'CNAME' ) ;
154+ expect ( dns . resolve ) . to . not . be . calledWith ( sinon . match . string , 'CNAME' ) ;
155155 } ) ;
156156 } ) ;
157157 } ) ;
@@ -169,8 +169,8 @@ describe('GSSAPI', () => {
169169
170170 expect ( error . message ) . to . equal ( 'failed' ) ;
171171 expect ( dns . lookup ) . to . be . calledOnceWith ( hostName ) ;
172- expect ( dns . resolve ) . to . not . be . calledWith ( sinon . match . any , 'PTR' ) ;
173- expect ( dns . resolve ) . to . not . be . calledWith ( sinon . match . any , 'CNAME' ) ;
172+ expect ( dns . resolve ) . to . not . be . calledWith ( sinon . match . string , 'PTR' ) ;
173+ expect ( dns . resolve ) . to . not . be . calledWith ( sinon . match . string , 'CNAME' ) ;
174174 } ) ;
175175 } ) ;
176176 } ) ;
@@ -183,7 +183,10 @@ describe('GSSAPI', () => {
183183
184184 beforeEach ( ( ) => {
185185 resolveSpy . restore ( ) ;
186- sinon . stub ( dns , 'resolve' ) . withArgs ( sinon . match . any , 'CNAME' ) . rejects ( new Error ( 'failed' ) ) ;
186+ sinon
187+ . stub ( dns , 'resolve' )
188+ . withArgs ( sinon . match . string , 'CNAME' )
189+ . rejects ( new Error ( 'failed' ) ) ;
187190 } ) ;
188191
189192 it ( 'falls back to the provided host name' , async ( ) => {
@@ -200,7 +203,7 @@ describe('GSSAPI', () => {
200203
201204 beforeEach ( ( ) => {
202205 resolveSpy . restore ( ) ;
203- sinon . stub ( dns , 'resolve' ) . withArgs ( sinon . match . any , 'CNAME' ) . resolves ( [ resolved ] ) ;
206+ sinon . stub ( dns , 'resolve' ) . withArgs ( sinon . match . string , 'CNAME' ) . resolves ( [ resolved ] ) ;
204207 } ) ;
205208
206209 it ( 'uses the result' , async ( ) => {
@@ -218,7 +221,7 @@ describe('GSSAPI', () => {
218221 resolveSpy . restore ( ) ;
219222 sinon
220223 . stub ( dns , 'resolve' )
221- . withArgs ( sinon . match . any , 'CNAME' )
224+ . withArgs ( sinon . match . string , 'CNAME' )
222225 . resolves ( [ resolved , hostName ] ) ;
223226 } ) ;
224227
@@ -235,7 +238,7 @@ describe('GSSAPI', () => {
235238
236239 beforeEach ( ( ) => {
237240 resolveSpy . restore ( ) ;
238- sinon . stub ( dns , 'resolve' ) . withArgs ( sinon . match . any , 'CNAME' ) . resolves ( [ ] ) ;
241+ sinon . stub ( dns , 'resolve' ) . withArgs ( sinon . match . string , 'CNAME' ) . resolves ( [ ] ) ;
239242 } ) ;
240243
241244 it ( 'falls back to using the provided host' , async ( ) => {
0 commit comments