Skip to content
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 sync-tag eslint rule #647

Merged
merged 1 commit into from
Apr 14, 2023
Merged

Fix sync-tag eslint rule #647

merged 1 commit into from
Apr 14, 2023

Conversation

kevinbarabash
Copy link
Contributor

Summary:

The tests didn't catch this because they were mocking it. The reason why we need to bother with these util wrappers around functions is that RuleTester doesn't provide a way to mock things so I ended up having to mock things in a hacky way. I added an assert() call to the place where we do the mocking, but I think we need rethink how we write eslint tests. We should probably create our own jest-based test harness, but that'll take some doing so I'm going to punt on it for now.

Issue: None

Test plan:

  • yarn --cwd packages/eslint-plugin-khan test

@kevinbarabash kevinbarabash self-assigned this Apr 14, 2023
@changeset-bot
Copy link

changeset-bot bot commented Apr 14, 2023

🦋 Changeset detected

Latest commit: 434c5f8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@khanacademy/eslint-plugin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@khan-actions-bot khan-actions-bot requested a review from a team April 14, 2023 18:38
@khan-actions-bot
Copy link
Contributor

Gerald

Required Reviewers
  • @Khan/frontend-infra for changes to .changeset/eight-bats-beg.md, packages/eslint-plugin-khan/lib/util.js, packages/eslint-plugin-khan/test/sync-tag_test.js

Don't want to be involved in this pull request? Comment #removeme and we won't notify you of further changes.

@@ -1,6 +1,7 @@
const {execFile} = require("child_process");
const {execFile, execSync} = require("child_process");
Copy link
Member

Choose a reason for hiding this comment

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

It seems like using types would've solved this specific issue, as well, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That too. This code needs a lot of TLC.

@github-actions
Copy link
Contributor

Size Change: 0 B

Total Size: 4.42 kB

ℹ️ View Unchanged
Filename Size
packages/wonder-stuff-core/dist/browser/es/index.js 1.78 kB
packages/wonder-stuff-sentry/dist/browser/es/index.js 1.66 kB
packages/wonder-stuff-testing/dist/browser/es/index.js 970 B

compressed-size-action

@codecov
Copy link

codecov bot commented Apr 14, 2023

Codecov Report

Merging #647 (434c5f8) into main (4f5821e) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #647   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           93        93           
  Lines         1352      1349    -3     
  Branches       343       328   -15     
=========================================
- Hits          1352      1349    -3     

see 3 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4f5821e...434c5f8. Read the comment docs.

@kevinbarabash kevinbarabash merged commit a621be6 into main Apr 14, 2023
@kevinbarabash kevinbarabash deleted the fix-sync-tag-rule branch April 14, 2023 19:01
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.

3 participants