Skip to content

Commit 818a634

Browse files
Chore: Add test summary to end of bin/script
Because: * It's a nice QOL improvement
1 parent 7eb783e commit 818a634

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

bin/test

+14-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
11
#!/usr/bin/env ruby
22

3+
results = { 'Rubocop' => false, 'RSpec' => false, 'ESLint' => false, 'Jest' => false }
34
puts "\n== Running linters =="
45
puts 'Rubocop:'
5-
system 'bundle exec rubocop'
6+
results['Rubocop'] = system 'bundle exec rubocop'
7+
68
puts 'ESlint:'
7-
system 'yarn eslint'
9+
results['ESLint'] = system 'yarn eslint'
810

911
puts "\n== Running specs =="
1012
puts 'Rspec:'
11-
system 'bundle exec rspec'
13+
results['RSpec'] = system 'bundle exec rspec'
1214
puts 'Jest:'
13-
system 'yarn test'
15+
results['Jest'] = system 'yarn test'
16+
17+
puts "\n== Final Results =="
18+
puts results.map {|k,v| "#{k.ljust(7)} #{v == true ? '✅' : '❌' }" }
19+
if results.values.all? { |v| v == true }
20+
puts 'All tests passing! 🎉'
21+
else
22+
puts 'Failing tests! 😭'
23+
end

0 commit comments

Comments
 (0)