Skip to content

Commit

Permalink
Styling
Browse files Browse the repository at this point in the history
  • Loading branch information
MisanthropicBit committed Jun 27, 2024
1 parent b68324a commit a273192
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions tests/adapter_results_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,11 @@ describe("adapter.results", function()
assert.are.same(neotest_results, {})

assert.stub(lib.files.read).was.called_with(spec.context.results_path)
assert.stub(logger.error).was.called_with("Failed to read json test output file test_output.json with error: Could not read file")
assert
.stub(logger.error).was
.called_with(
"Failed to read json test output file test_output.json with error: Could not read file"
)
end)

it("handles failure to decode json", function()
Expand All @@ -169,7 +173,9 @@ describe("adapter.results", function()
assert.are.same(neotest_results, {})

assert.stub(lib.files.read).was.called_with(spec.context.results_path)
assert.stub(logger.error).was.called_with("Failed to parse json test output file test_output.json with error: Expected value but found invalid token at character 1")
assert.stub(logger.error).was.called_with(
"Failed to parse json test output file test_output.json with error: Expected value but found invalid token at character 1"
)

vim.json.decode:revert()
end)
Expand Down Expand Up @@ -204,6 +210,10 @@ describe("adapter.results", function()
})

assert.stub(lib.files.read).was.called_with(spec.context.results_path)
assert.stub(logger.error).was.called_with("Failed to find matching position id for key " .. test_path .. "::namespace tests a failing test::7")
assert.stub(logger.error).was.called_with(
"Failed to find matching position id for key "
.. test_path
.. "::namespace tests a failing test::7"
)
end)
end)

0 comments on commit a273192

Please sign in to comment.