Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
andyw8 committed Apr 19, 2024
1 parent d276f0b commit 2969963
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/requests/code_actions_formatting_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ def assert_corrects_to_expected(diagnostic_code, code_action_title, source, expe
)

diagnostics = RubyLsp::Requests::Diagnostics.new(global_state, document).perform
diagnostic = T.must(T.must(diagnostics).find { |d| d.code == diagnostic_code })
# binding.irb
diagnostic = T.must(T.must(diagnostics).find { |d| d.attributes[:code] && (d.code == diagnostic_code) })
range = diagnostic.range.to_hash.transform_values(&:to_hash)
result = RubyLsp::Requests::CodeActions.new(document, range, {
diagnostics: [JSON.parse(T.must(diagnostic).to_json, symbolize_names: true)],
Expand Down

0 comments on commit 2969963

Please sign in to comment.