Skip to content

Commit 1937e22

Browse files
committed
ad more validation
1 parent db2e60c commit 1937e22

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

Diff for: .circleci/config.yml

+19
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,12 @@ workflows:
122122
- run:
123123
command: npx nyc report --check-coverage true --lines 100
124124
working_directory: examples/before-each-visit
125+
- run:
126+
name: Check code coverage 📈
127+
command: |
128+
node ../../scripts/check-coverage main.js
129+
node ../../scripts/only-covered main.js
130+
working_directory: examples/before-each-visit
125131

126132
- cypress/run:
127133
attach-workspace: true
@@ -145,6 +151,12 @@ workflows:
145151
- run:
146152
command: npx nyc report --check-coverage true --lines 100
147153
working_directory: examples/before-all-visit
154+
- run:
155+
name: Check code coverage 📈
156+
command: |
157+
node ../../scripts/check-coverage main.js
158+
node ../../scripts/only-covered main.js
159+
working_directory: examples/before-all-visit
148160

149161
- cypress/run:
150162
attach-workspace: true
@@ -168,6 +180,13 @@ workflows:
168180
command: npm run coverage:check
169181
working_directory: examples/ts-example
170182

183+
- run:
184+
name: Check code coverage 📈
185+
command: |
186+
node ../../scripts/check-coverage main.ts
187+
node ../../scripts/only-covered main.ts
188+
working_directory: examples/ts-example
189+
171190
- cypress/run:
172191
attach-workspace: true
173192
name: example-same-folder

Diff for: scripts/check-coverage.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ if (isThereUncoveredStatement) {
4141
}
4242

4343
console.log(
44-
'All statements in file %s (found for %s) were covered',
44+
'All statements in file %s (found for %s) were covered',
4545
fileCoverage.path,
4646
filename
4747
)

Diff for: scripts/only-covered.js

+2
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,5 @@ if (covered.length < filenames.length) {
4747

4848
process.exit(1)
4949
}
50+
51+
console.log('✅ All and only expected files were covered')

0 commit comments

Comments
 (0)