1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00
mastodon/spec/support/javascript_errors.rb

19 lines
494 B
Ruby
Raw Normal View History

2024-01-12 01:12:31 -08:00
# frozen_string_literal: true
RSpec.configure do |config|
config.after(:each, type: :system) do
errors = page.driver.browser.logs.get(:browser)
if errors.present?
aggregate_failures 'javascript errrors' do
errors.each do |error|
expect(error.level).to_not eq('SEVERE'), error.message
next unless error.level == 'WARNING'
$stderr.warn 'WARN: javascript warning'
$stderr.warn error.message
end
end
end
end
end