Check node argument is defined before use#285
Check node argument is defined before use#285SimenB merged 4 commits intojest-community:masterfrom G-Rath:check-node-argument-is-defined-before-use
Conversation
|
Random question: for some reason there are a couple of seemingly stray strings in the output on travis: Two A stray Anyone know what's up w/ that, or is it just random out-of-sync console output? |
|
Could you add a test that fails without this change? Dunno about the terminal output, but travis's output have been weird to ansi eacapes many times |
|
I was a bit worried you'd ask me that, as there are currently no tests for utils. Would it be enough to add a test for Otherwise, I can just write a test where I pass |
|
A test for |
|
Done 👍 |
|
🎉 This PR is included in version 22.7.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This fixes errors like this one in
no-empty-title:This was caused by a lack of definition guard:
eslint-plugin-jest/src/rules/no-empty-title.js
Lines 33 to 36 in d7a9532
I figured there is no harm in adding
node &&to all the util methods.Ironically this (hopefully) would be caught when converting to typescript 😉