Skip to content

Commit e9a7f06

Browse files
committed
Fix file write
Signed-off-by: Shubham Sharma <[email protected]>
1 parent f8a8baa commit e9a7f06

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/workflows/test-e2e.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ jobs:
115115
run: |
116116
FILENAME=E2E_TEST_ERROR
117117
if [[ -f "$FILENAME" ]]; then
118+
echo "Detected error in E2E tests. Please check the above step for error logs."
118119
exit 1
119120
fi
120121

test/e2e/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var fs = require("fs");
1+
import fs from "fs";
22

33
const errorFilePath = "E2E_TEST_ERROR";
44

@@ -17,5 +17,5 @@ export async function testIt(name: string, fn?: any, timeout?: number): Promise<
1717

1818
// Creates an empty file at filepath.
1919
function touchFile(filepath: string) {
20-
fs.write(fs.openSync(filepath, 'w'));
20+
fs.writeFileSync(filepath, '');
2121
}

0 commit comments

Comments
 (0)