test: Don't expect_error() without asserting the message

Open
#256 1 comment 0 reactions 1 assignee View on GitHub

@toph-allen is already working on this.

Since Dec 20, 2024.

Assessment

This issue has not been assessed yet.

Description

I fixed one issue recently where there was a syntax error in the error message construction, so instead of showing the expected message, it was showing a string interpolation error. But the test we had for that case was just doing expect_error(), so it was passing. We should generally assert something about the error message so that we know the expected error is happening.

Dominant language
R
Stars
54
Forks
27
Avg merge
1d 3m
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from posit-dev/connectapi

All issues in posit-dev/connectapi

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.