Sha256: 0c77fb51150ee8f069c538ce6bbe7d02d3fec26191c3d642bf1115dd4046091e

Contents?: true

Size: 626 Bytes

Versions: 1

Compression:

Stored size: 626 Bytes

Contents

# frozen_string_literal: true

# example_status reporter for Solargraph
module SolargraphTestCoverage
  class ExampleStatusReporter < Solargraph::Diagnostics::Base
    include ReporterHelpers
    include ReporterGuards
    include DiagnosticMessages

    def diagnose(source, _api_map)
      @source    = source
      @filename  = source.location.filename

      return [] if source.code.empty? || using_debugger? || !in_test_dir? || test_support_file?

      @results = run_test(@filename)

      example_failing_errors.compact
    rescue ChildFailedError => e
      Config.debug? ? [debug_message(e)] : []
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
solargraph_test_coverage-0.3.1.1 lib/solargraph_test_coverage/example_status_reporter.rb