Skip to content

Commit 6f2844f

Browse files
committed
feat: log a message when no tests were executed in queue mode
1 parent 6e72505 commit 6f2844f

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

lib/knapsack_pro/report.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ def self.save_node_queue_to_api(test_files = nil)
4141
end
4242
end
4343

44+
if test_files.empty?
45+
KnapsackPro.logger.info("No tests were executed because the test queue is empty.")
46+
end
47+
4448
measured_test_files = test_files
4549
.map { |t| t['time_execution'] }
4650
.select { |time_execution| time_execution != KnapsackPro::Tracker::DEFAULT_TEST_FILE_TIME }

spec/integration/runners/queue/rspec_runner_spec.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1579,6 +1579,7 @@ def when_first_matching_example_defined(type:)
15791579
actual = subject
15801580

15811581
expect(actual.stdout).to include('0 examples, 0 failures')
1582+
expect(actual.stdout).to include('INFO -- knapsack_pro: No tests were executed because the test queue is empty.')
15821583

15831584
expect(actual.exit_code).to eq 0
15841585
end
@@ -1602,6 +1603,7 @@ def when_first_matching_example_defined(type:)
16021603
actual = subject
16031604

16041605
expect(actual.stdout).to include('0 examples, 0 failures')
1606+
expect(actual.stdout).to include('INFO -- knapsack_pro: No tests were executed because the test queue is empty.')
16051607

16061608
expect(actual.exit_code).to eq 0
16071609
end

0 commit comments

Comments
 (0)