Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Fix assertions in Task tests & fix tests; thanks SonarLint #1724

Merged
merged 1 commit into from
Mar 5, 2023

Conversation

claremacrae
Copy link
Collaborator

@claremacrae claremacrae commented Mar 5, 2023

Description

  • Add some missing assertions in Task.test.ts
  • And fix the incorrect tests that then failed!

SonarLint in WebStorm reports:

  • Assertions should be complete.
  • CodeSmell typescript: S2970
  • It is very easy to write incomplete assertions when using some test frameworks.

It turns out that 4 of the tests were actually incorrect, but seemed to be passing because they were not asserting on the result.

Motivation and Context

See above.

How has this been tested?

Running the tests. They failed :-)

Screenshots (if appropriate)

Types of changes

Internal changes:

  • Tests (prefix: test - additions and improvements to unit tests and the smoke tests)

Checklist

n/a

Terms

SonarLint in WebStorm reports:

Assertions should be complete.
CodeSmell typescript: S2970
It is very easy to write incomplete assertions when using some test frameworks.

It turns out that 4 of the tests were actually incorrect, but seemed to
be passing because they were not asserting on the result.
@claremacrae claremacrae merged commit 6134d46 into main Mar 5, 2023
@claremacrae claremacrae deleted the add-missing-assertions branch March 5, 2023 12:42
@claremacrae claremacrae added the type: internal Only regards development or contributing label Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: internal Only regards development or contributing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant