Skip to content

Commit e0d83ce

Browse files
authored
Merge pull request #21180 from Homebrew/test-typed-strict
test: `typed: strict`
2 parents aabd7cf + daf13a0 commit e0d83ce

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Library/Homebrew/test.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# typed: true # rubocop:todo Sorbet/StrictSigil
1+
# typed: strict
22
# frozen_string_literal: true
33

44
raise "#{__FILE__} must not be loaded via `require`." if $PROGRAM_NAME != __FILE__
@@ -17,7 +17,7 @@
1717
require "json/add/exception"
1818
require "extend/pathname/write_mkpath_extension"
1919

20-
DEFAULT_TEST_TIMEOUT_SECONDS = 5 * 60
20+
DEFAULT_TEST_TIMEOUT_SECONDS = T.let(5 * 60, Integer)
2121

2222
begin
2323
# Undocumented opt-out for internal use.
@@ -50,9 +50,9 @@
5050
Pathname.activate_extensions!
5151

5252
# tests can also return false to indicate failure
53-
run_test = proc { |_ = nil| raise "test returned false" if formula.run_test(keep_tmp: args.keep_tmp?) == false }
53+
run_test = proc { |_| raise "test returned false" if formula.run_test(keep_tmp: args.keep_tmp?) == false }
5454
if args.debug? # --debug is interactive
55-
run_test.call
55+
run_test.call(nil)
5656
else
5757
# HOMEBREW_TEST_TIMEOUT_SECS is private API and subject to change.
5858
timeout = ENV["HOMEBREW_TEST_TIMEOUT_SECS"]&.to_i || DEFAULT_TEST_TIMEOUT_SECONDS

0 commit comments

Comments
 (0)