-
Notifications
You must be signed in to change notification settings - Fork 336
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
fix: use resolove to find imports in tests #715
Conversation
Codecov Report
@@ Coverage Diff @@
## master #715 +/- ##
=======================================
Coverage 87.20% 87.20%
=======================================
Files 55 55
Lines 6704 6705 +1
Branches 594 625 +31
=======================================
+ Hits 5846 5847 +1
Misses 857 857
Partials 1 1
Continue to review full report at Codecov.
|
wallaby.js
Outdated
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
module.exports = wallaby => { |
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.
I'm on the fence about whether we should have configuration for a paid product in the top level of the library, what if instead you create a gist of this configuration, and we add a testing section to the README.md that could link to it?
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.
Done. I have removed the file from this PR and created https://gist.github.com/safarmer/7d112dd6e22bcf96286623b06e7191c3
test/releasers/java-yoshi.ts
Outdated
@@ -495,7 +494,7 @@ describe('JavaYoshi', () => { | |||
// check for default branch | |||
.get('/repos/googleapis/java-trace') | |||
// eslint-disable-next-line @typescript-eslint/no-var-requires | |||
.reply(200, require('../../../test/fixtures/repo-get-2.json')) | |||
.reply(200, require(resolve('./test/fixtures/repo-get-2.json'))) |
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.
Happy to land these changes.
This changes test imports to use `resolve` so that they can be run more easily from IDEs and tools such as wallaby.js. Based on my testing, this looks like a safe change to make, and all tests pass in VSCode, with node test, and in Wallaby.JS (running inside VSCode).
@safarmer thank you for the contribution, 👍. Do feel free to add a blurb in a testing section in the README for me to review. |
@safarmer to land this again, I think we could actually potentially keep the I'm curious what other libraries might be doing that load package.json for version. |
testing changes referenced in code review for #714
This changes test imports to use
resolve
so that they can be run more easily from IDEs and toolssuch as wallaby.js. Based on my testing, this looks like a safe change to make, and all tests pass
in VSCode, with node test, and in Wallaby.JS (running inside VSCode).