Skip to content

JS-72 JS-342 Calls to node:assert library should count as valid assertions #5320

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

Merged
merged 7 commits into from
Apr 28, 2025

Conversation

zglicz
Copy link
Contributor

@zglicz zglicz commented Apr 23, 2025

JS-41

This way, if a user is using the node built-in library 'assert', we will consider it a valid assertion.

@zglicz zglicz requested a review from a team April 23, 2025 16:05
@zglicz zglicz changed the title JS-41 Calls to node:assert library should count as valid assertions JS-72 Calls to node:assert library should count as valid assertions Apr 23, 2025
@@ -0,0 +1,16 @@
import assert, { deepStrictEqual } from "assert";
import vitest from 'vitest';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be any import from the 4 frameworks that identify a file to be a test file.

deepStrictEqual({ a: 1 }, { a: '1' });
});

it('should recognize issue', () => { // Noncompliant {{Add at least one assertion to this test case.}}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Necessary to have an issue that raises in each test

@zglicz zglicz changed the title JS-72 Calls to node:assert library should count as valid assertions JS-72 JS-342 Calls to node:assert library should count as valid assertions Apr 24, 2025
@vdiez vdiez enabled auto-merge (squash) April 28, 2025 09:07
Copy link

@vdiez vdiez merged commit 18244b0 into master Apr 28, 2025
21 checks passed
@vdiez vdiez deleted the js-41 branch April 28, 2025 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants