@@ -58,7 +58,7 @@ describe('lib/hermione', () => {
5858
5959 HermioneReporter ( hermione , opts ) ;
6060
61- return hermione . emitAndWait ( hermione . events . INIT ) ;
61+ return hermione . emitAsync ( hermione . events . INIT ) ;
6262 }
6363
6464 function mkStubResult_ ( options = { } ) {
@@ -73,7 +73,7 @@ describe('lib/hermione', () => {
7373 }
7474
7575 async function stubWorkers ( ) {
76- await hermione . emitAndWait ( events . RUNNER_START , {
76+ await hermione . emitAsync ( events . RUNNER_START , {
7777 registerWorkers : ( ) => {
7878 return { saveDiffTo : sandbox . stub ( ) } ;
7979 }
@@ -138,15 +138,15 @@ describe('lib/hermione', () => {
138138 it ( 'should add skipped test to result' , async ( ) => {
139139 await initReporter_ ( ) ;
140140 hermione . emit ( events . TEST_PENDING , mkStubResult_ ( { title : 'some-title' } ) ) ;
141- await hermione . emitAndWait ( hermione . events . RUNNER_END ) ;
141+ await hermione . emitAsync ( hermione . events . RUNNER_END ) ;
142142
143143 assert . deepEqual ( StaticReportBuilder . prototype . addSkipped . args [ 0 ] [ 0 ] . state , { name : 'some-title' } ) ;
144144 } ) ;
145145
146146 it ( 'should add passed test to result' , async ( ) => {
147147 await initReporter_ ( ) ;
148148 hermione . emit ( events . TEST_PASS , mkStubResult_ ( { title : 'some-title' } ) ) ;
149- await hermione . emitAndWait ( hermione . events . RUNNER_END ) ;
149+ await hermione . emitAsync ( hermione . events . RUNNER_END ) ;
150150
151151 assert . deepEqual ( StaticReportBuilder . prototype . addSuccess . args [ 0 ] [ 0 ] . state , { name : 'some-title' } ) ;
152152 } ) ;
@@ -158,7 +158,7 @@ describe('lib/hermione', () => {
158158 await initReporter_ ( ) ;
159159
160160 hermione . emit ( events [ event ] , testResult ) ;
161- await hermione . emitAndWait ( hermione . events . RUNNER_END ) ;
161+ await hermione . emitAsync ( hermione . events . RUNNER_END ) ;
162162
163163 assert . deepEqual ( StaticReportBuilder . prototype . addError . args [ 0 ] [ 0 ] . state , { name : 'some-title' } ) ;
164164 } ) ;
@@ -169,7 +169,7 @@ describe('lib/hermione', () => {
169169 err . stateName = 'state-name' ;
170170
171171 hermione . emit ( events [ event ] , mkStubResult_ ( { title : 'some-title' , assertViewResults : [ err ] } ) ) ;
172- await hermione . emitAndWait ( hermione . events . RUNNER_END ) ;
172+ await hermione . emitAsync ( hermione . events . RUNNER_END ) ;
173173
174174 assert . deepEqual ( StaticReportBuilder . prototype . addError . args [ 0 ] [ 0 ] . state , { name : 'some-title' } ) ;
175175 } ) ;
@@ -185,7 +185,7 @@ describe('lib/hermione', () => {
185185 } ) ;
186186
187187 hermione . emit ( events [ event ] , testResult ) ;
188- await hermione . emitAndWait ( hermione . events . RUNNER_END ) ;
188+ await hermione . emitAsync ( hermione . events . RUNNER_END ) ;
189189
190190 assert . deepEqual ( StaticReportBuilder . prototype . addFail . args [ 0 ] [ 0 ] . state , { name : 'some-title' } ) ;
191191 } ) ;
@@ -197,7 +197,7 @@ describe('lib/hermione', () => {
197197 err . stateName = 'state-name' ;
198198
199199 hermione . emit ( events [ event ] , mkStubResult_ ( { title : 'some-title' , assertViewResults : [ err ] } ) ) ;
200- await hermione . emitAndWait ( hermione . events . RUNNER_END ) ;
200+ await hermione . emitAsync ( hermione . events . RUNNER_END ) ;
201201
202202 assert . deepEqual ( StaticReportBuilder . prototype . addFail . args [ 0 ] [ 0 ] . state , { name : 'some-title' } ) ;
203203 } ) ;
@@ -210,7 +210,7 @@ describe('lib/hermione', () => {
210210 await initReporter_ ( { path : '/absolute' } ) ;
211211 const testData = mkStubResult_ ( { assertViewResults : [ { refImg : { path : 'ref/path' } , stateName : 'plain' } ] } ) ;
212212 hermione . emit ( events . TEST_PASS , testData ) ;
213- await hermione . emitAndWait ( events . RUNNER_END ) ;
213+ await hermione . emitAsync ( events . RUNNER_END ) ;
214214
215215 assert . calledOnceWith ( utils . copyFileAsync , 'ref/path' , 'report/plain' , '/absolute' ) ;
216216 } ) ;
@@ -223,7 +223,7 @@ describe('lib/hermione', () => {
223223 err . currImg = { path : 'current/path' } ;
224224
225225 hermione . emit ( events . RETRY , mkStubResult_ ( { assertViewResults : [ err ] } ) ) ;
226- await hermione . emitAndWait ( events . RUNNER_END ) ;
226+ await hermione . emitAsync ( events . RUNNER_END ) ;
227227
228228 assert . calledOnceWith ( utils . copyFileAsync , 'current/path' , 'report/plain' , '/absolute' ) ;
229229 } ) ;
@@ -238,15 +238,15 @@ describe('lib/hermione', () => {
238238 err . refImg = { path : 'reference/path' } ;
239239
240240 hermione . emit ( events . TEST_FAIL , mkStubResult_ ( { assertViewResults : [ err ] } ) ) ;
241- await hermione . emitAndWait ( events . RUNNER_END ) ;
241+ await hermione . emitAsync ( events . RUNNER_END ) ;
242242
243243 assert . calledWith ( utils . copyFileAsync , 'reference/path' , 'report/plain' , '/absolute' ) ;
244244 } ) ;
245245
246246 it ( 'should save current image from assert view fail' , async ( ) => {
247247 utils . getCurrentPath . callsFake ( ( test , stateName ) => `report/${ stateName } ` ) ;
248248 await initReporter_ ( { path : '/absolute' } ) ;
249- await hermione . emitAndWait ( events . RUNNER_START , {
249+ await hermione . emitAsync ( events . RUNNER_START , {
250250 registerWorkers : ( ) => {
251251 return { saveDiffTo : sandbox . stub ( ) } ;
252252 }
@@ -256,7 +256,7 @@ describe('lib/hermione', () => {
256256 err . currImg = { path : 'current/path' } ;
257257
258258 hermione . emit ( events . TEST_FAIL , mkStubResult_ ( { assertViewResults : [ err ] } ) ) ;
259- await hermione . emitAndWait ( events . RUNNER_END ) ;
259+ await hermione . emitAsync ( events . RUNNER_END ) ;
260260
261261 assert . calledWith ( utils . copyFileAsync , 'current/path' , 'report/plain' , '/absolute' ) ;
262262 } ) ;
@@ -270,13 +270,13 @@ describe('lib/hermione', () => {
270270
271271 await initReporter_ ( ) ;
272272
273- await hermione . emitAndWait ( events . RUNNER_START , {
273+ await hermione . emitAsync ( events . RUNNER_START , {
274274 registerWorkers : ( ) => {
275275 return { saveDiffTo} ;
276276 }
277277 } ) ;
278278 hermione . emit ( events . TEST_FAIL , mkStubResult_ ( { assertViewResults : [ err ] } ) ) ;
279- await hermione . emitAndWait ( events . RUNNER_END ) ;
279+ await hermione . emitAsync ( events . RUNNER_END ) ;
280280
281281 assert . calledWith (
282282 saveDiffTo , sinon . match . instanceOf ( ImageDiffError ) , sinon . match ( '/report/plain' )
0 commit comments