File tree Expand file tree Collapse file tree
e2e/transform/transform-runner Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ import {
1515 TestWatcher ,
1616} from 'jest-runner' ;
1717import throat from 'throat' ;
18- import { TestResult } from '@jest/test-result' ;
18+ import { TestResult , createEmptyTestResult } from '@jest/test-result' ;
1919
2020export default class BaseTestRunner {
2121 private _globalConfig : Config . GlobalConfig ;
@@ -38,37 +38,25 @@ export default class BaseTestRunner {
3838 ( promise , test ) =>
3939 mutex ( ( ) =>
4040 promise
41- . then ( async ( ) => {
41+ . then ( async ( ) : Promise < TestResult > => {
4242 await onStart ( test ) ;
4343 return {
44- numFailingTests : 0 ,
44+ ... createEmptyTestResult ( ) ,
4545 numPassingTests : 1 ,
46- numPendingTests : 0 ,
47- numTodoTests : 0 ,
48- perfStats : {
49- end : 0 ,
50- start : 0 ,
51- } ,
52- snapshot : {
53- added : 0 ,
54- fileDeleted : false ,
55- matched : 0 ,
56- unchecked : 0 ,
57- unmatched : 0 ,
58- updated : 0 ,
59- } ,
6046 testFilePath : test . path ,
6147 testResults : [
6248 {
6349 ancestorTitles : [ ] ,
6450 duration : 2 ,
6551 failureMessages : [ ] ,
6652 fullName : 'sample test' ,
53+ location : null ,
54+ numPassingAsserts : 1 ,
6755 status : 'passed' ,
6856 title : 'sample test' ,
6957 } ,
7058 ] ,
71- } as TestResult ;
59+ } ;
7260 } )
7361 . then ( result => onResult ( test , result ) )
7462 . catch ( err => onFailure ( test , err ) )
You can’t perform that action at this time.
0 commit comments