@@ -125,8 +125,8 @@ describe('linkinator action', () => {
125125 . head ( '/fake' ) . reply ( 500 ) ;
126126 await action ( ) ;
127127 assert . ok ( inputStub . called ) ;
128- assert . ok ( setOutputStub . calledOnce ) ;
129- assert . ok ( setFailedStub . calledOnce ) ;
128+ assert . strictEqual ( setOutputStub . callCount , 1 ) ;
129+ assert . strictEqual ( setFailedStub . callCount , 1 ) ;
130130
131131 // ensure `Scanning ...` is always shown
132132 assert . strictEqual ( infoStub . getCalls ( ) . filter ( x => {
@@ -135,11 +135,11 @@ describe('linkinator action', () => {
135135
136136 // Ensure total count is always shown
137137 assert . strictEqual ( setFailedStub . getCalls ( ) . filter ( x => {
138- return x . args [ 0 ] === 'Detected 1 broken links.' ;
138+ return x . args [ 0 ] === 'Detected 1 broken links.\n test/fixtures/test.md\n [500] http://fake.local/fake ' ;
139139 } ) . length , 1 ) ;
140140
141141 // Ensure `core.error` is called for each failure
142- assert . ok ( errorStub . calledOnce ) ;
142+ assert . strictEqual ( errorStub . callCount , 1 ) ;
143143 const expected = '[500] http://fake.local/fake' ;
144144 assert . strictEqual ( errorStub . getCalls ( ) [ 0 ] . args [ 0 ] , expected ) ;
145145
@@ -159,7 +159,7 @@ describe('linkinator action', () => {
159159 const scope = nock ( 'http://fake.local' ) . head ( '/' ) . reply ( 200 ) ;
160160 await action ( ) ;
161161 assert . ok ( inputStub . called ) ;
162- assert . ok ( setOutputStub . calledOnce ) ;
162+ assert . strictEqual ( setOutputStub . callCount , 1 ) ;
163163 assert . ok ( setFailedStub . notCalled ) ;
164164 assert . ok ( errorStub . notCalled ) ;
165165 assert . strictEqual ( infoStub . getCalls ( ) . length , 5 ) ;
@@ -183,9 +183,9 @@ describe('linkinator action', () => {
183183 await action ( ) ;
184184 assert . ok ( inputStub . called ) ;
185185 assert . ok ( infoStub . called ) ;
186- assert . ok ( setOutputStub . calledOnce ) ;
187- assert . ok ( setFailedStub . calledOnce ) ;
188- assert . ok ( errorStub . calledOnce ) ;
186+ assert . strictEqual ( setOutputStub . callCount , 1 ) ;
187+ assert . strictEqual ( setFailedStub . callCount , 1 ) ;
188+ assert . strictEqual ( errorStub . callCount , 1 ) ;
189189 const expected = / N o m a t c h f o r r e q u e s t / ;
190190 assert . ok ( infoStub . getCalls ( ) . find ( x => expected . test ( x . args [ 0 ] ) ) ) ;
191191 scope . done ( ) ;
0 commit comments