File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed
Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -113,8 +113,8 @@ jobs:
113113 - name : Check E2E test failure
114114 continue-on-error : false
115115 run : |
116- echo "E2E_TEST_FAILURE=$E2E_TEST_FAILURE"
117- if [[ -v E2E_TEST_FAILURE ]]; then
116+ FILENAME=E2E_TEST_ERROR
117+ if [[ -f "$FILENAME" ]]; then
118118 exit 1
119119 fi
120120
Original file line number Diff line number Diff line change 1+ var fs = require ( "fs" ) ;
2+
3+ const errorFilePath = "E2E_TEST_ERROR" ;
4+
15export async function testIt ( name : string , fn ?: any , timeout ?: number ) : Promise < void > {
26 test ( name , async ( ) => {
37 try {
48 await fn ( )
59 }
610 catch ( error ) {
7- // set failure environment variable
8- process . env . E2E_TEST_FAILURE = "true" ;
11+ // Create a new file to denote error.
12+ touchFile ( errorFilePath ) ;
913 throw error
1014 }
1115 } , timeout )
16+ }
17+
18+ // Creates an empty file at filepath.
19+ function touchFile ( filepath : string ) {
20+ fs . write ( fs . openSync ( filepath , 'w' ) ) ;
1221}
You can’t perform that action at this time.
0 commit comments