-
Notifications
You must be signed in to change notification settings - Fork 188
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
Conversation
@@ -0,0 +1,16 @@ | |||
import assert, { deepStrictEqual } from "assert"; | |||
import vitest from 'vitest'; |
There was a problem hiding this comment.
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.}} |
There was a problem hiding this comment.
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
|
JS-41
This way, if a user is using the node built-in library 'assert', we will consider it a valid assertion.