Skip to content

Commit e7a34f5

Browse files
committed
feat: take file as arg
1 parent e1286b0 commit e7a34f5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/e2e/scripts/counter.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
// Anvil chain outputs every RPC call to stdout
22
// You can save the output to a file and then use this script to count the number of times a specific RPC call is made.
33

4+
import { argv } from "bun";
45
import { readFile } from "fs/promises";
56
import { join } from "path";
67

7-
const file = join(__dirname, "rpc_spam.txt");
8+
const file = join(__dirname, argv[2]);
89

910
async function countLines(file: string) {
1011
const data = await readFile(file, "utf-8");

0 commit comments

Comments
 (0)