File tree 3 files changed +30
-4
lines changed
3 files changed +30
-4
lines changed Original file line number Diff line number Diff line change 90
90
"test:e2e" : " scripts/e2e" ,
91
91
"test:gas" : " RUN_EVM=true REPORT_GAS=true scripts/test" ,
92
92
"test:coverage" : " scripts/coverage" ,
93
+ "test:coverage:file" : " scripts/test-coverage-file" ,
93
94
"test:upgrade" : " scripts/upgrade" ,
94
95
"lint" : " yarn lint:ts && yarn lint:sol" ,
95
96
"lint:ts" : " eslint '**/*.{js,ts}' --fix" ,
103
104
},
104
105
"lint-staged" : {
105
106
"contracts/**/*.sol" : [
106
- " yarn lint:sol"
107
+ " prettier --write" ,
108
+ " solhint --fix --noPrompt --config node_modules/solhint-graph-config/index.js"
107
109
],
108
110
"**/*.ts" : [
109
- " yarn lint:ts "
111
+ " eslint --fix "
110
112
],
111
113
"**/*.js" : [
112
- " yarn lint:ts "
114
+ " eslint --fix "
113
115
],
114
116
"**/*.json" : [
115
- " yarn lint:ts "
117
+ " eslint --fix "
116
118
]
117
119
},
118
120
"repository" : {
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -eo pipefail
4
+
5
+ # Check if a test file was provided
6
+ if [ $# -eq 0 ]; then
7
+ echo " Error: You must provide a test file path"
8
+ echo " Usage: ./scripts/test-coverage-file test/unit/rewards/rewards.test.ts"
9
+ exit 1
10
+ fi
11
+
12
+ # Build contracts first to ensure tests run against latest code
13
+ echo " Building contracts before running coverage..."
14
+ yarn build
15
+
16
+ echo {} > addresses-local.json
17
+
18
+ echo " Running coverage for test file: $1 "
19
+ DISABLE_SECURE_ACCOUNTS=true \
20
+ L1_GRAPH_CONFIG=config/graph.hardhat.yml \
21
+ L2_GRAPH_CONFIG=config/graph.arbitrum-hardhat.yml \
22
+ ADDRESS_BOOK=addresses-local.json \
23
+ npx hardhat coverage --testfiles " $1 "
Original file line number Diff line number Diff line change
1
+ Subproject commit 77041d2ce690e692d6e03cc812b57d1ddaa4d505
You can’t perform that action at this time.
0 commit comments