-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
tools, test: forbid string literal as third argument for assert.strictEqual() and friends #22849
Commits on Sep 13, 2018
-
test: remove string literal message from assertion
Remove string literal message in assert.strictEqual() call in napi test testFinalizer.js.
Configuration menu - View commit details
-
Copy full SHA for abcaf56 - Browse repository at this point
Copy the full SHA abcaf56View commit details -
test: remove string literal message in assertions
Remove string literal message in assert.strictEqual() calls in test-async-await.js.
Configuration menu - View commit details
-
Copy full SHA for 486f6e8 - Browse repository at this point
Copy the full SHA 486f6e8View commit details -
test: improve assertion in test-inspector.js
Remove an unecessary string literal from assert.strictEqual() call in test-inspector.js. The string literal is printed instead of the value that causes an error. Removing the string literal allows the value that caused the error to be printed. This improves the troubleshooting experience when the test fails due to that assertion.
Configuration menu - View commit details
-
Copy full SHA for 890c455 - Browse repository at this point
Copy the full SHA 890c455View commit details -
test: simplify assertion in http2 tests
In test-http2-timeout-large-write.js and test-http2-timeout-large-write-file.js: Use assert.ok() on a boolean that the test itself creates and sets, rather than assert.strictEqual(). This allows us to use a static message without running afoul of the upcoming "do not use string literals with assert.strictEqual()" lint rule.
Configuration menu - View commit details
-
Copy full SHA for d65e189 - Browse repository at this point
Copy the full SHA d65e189View commit details -
Refactor test-vm-run-in-new-context so that check for `--expose-gc` flag will not run afoul of an upcoming lint rule that checks that string literals are not used for the `message` argument of `assert.strictEqual()`.
Configuration menu - View commit details
-
Copy full SHA for b23cb6c - Browse repository at this point
Copy the full SHA b23cb6cView commit details -
test: remove string literal from assertion
Remove string literal from `assert.strictEqual()` call `message` parameter and make it a comment above the assertion instead.
Configuration menu - View commit details
-
Copy full SHA for 36769be - Browse repository at this point
Copy the full SHA 36769beView commit details -
test: remove string literal message from assertion
Remove string literal from assert.strictEqual message to improve output of AssertionError.
Configuration menu - View commit details
-
Copy full SHA for 26f2e99 - Browse repository at this point
Copy the full SHA 26f2e99View commit details -
test: remove string literal arg from assertion
Remove unnecessary string literal from assert.deepStrictEqual() call.
Configuration menu - View commit details
-
Copy full SHA for 798a6dd - Browse repository at this point
Copy the full SHA 798a6ddView commit details -
test: remove string literal from assertion
Remove string literal as assertion message in call to assert.strictEqual() in test-dns-resolveany-bad-ancount.
Configuration menu - View commit details
-
Copy full SHA for af1f7c7 - Browse repository at this point
Copy the full SHA af1f7c7View commit details -
test: remove string literal from assertion
Remove string literal as assertion message in call to assert.strictEqual() in test-dns-lookup.
Configuration menu - View commit details
-
Copy full SHA for 8572e6e - Browse repository at this point
Copy the full SHA 8572e6eView commit details -
test: prepare test-assert for strictEqual linting
Make minor modifications to test-assert.js to prepare it for linting rule that forbids the use of string literals for the third argument of assert.strictEqual().
Configuration menu - View commit details
-
Copy full SHA for 4b9142c - Browse repository at this point
Copy the full SHA 4b9142cView commit details -
tools: prevent string literals in some assertions
String literals provided as the third argument to assert.strictEqual() or assert.deepStrictEqual() will mask the values that are causing issues. Use a lint rule to prevent such usage.
Configuration menu - View commit details
-
Copy full SHA for 51cd1ea - Browse repository at this point
Copy the full SHA 51cd1eaView commit details