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

Add matrix-org/jest linting #2973

Merged
merged 23 commits into from
Feb 10, 2023
Merged

Add matrix-org/jest linting #2973

merged 23 commits into from
Feb 10, 2023

Conversation

MadLittleMods
Copy link
Contributor

@MadLittleMods MadLittleMods commented Dec 14, 2022

Add matrix-org/jest linting

Part of matrix-org/eslint-plugin-matrix-org#33

Follow-up tasks:

Todo

Checklist

  • Tests written for new code (and old code if feasible)
  • Linter and other CI checks pass
  • Sign-off given on the changes (see CONTRIBUTING.md)

This change is marked as an internal change (Task), so will not be included in the changelog.

Pushing this out to a follow-up task,
#2976
"jest/valid-expect": "off",
// TODO: There are many cases to refactor away,
// https://github.com/matrix-org/matrix-js-sdk/issues/2978
"jest/no-conditional-expect": "off",
},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Testing locally, everything is passing atm ✅:

$ yarn lint:js
yarn run v1.22.18
$ eslint --max-warnings 0 src spec && prettier --check .
Checking formatting...
All matched files use Prettier code style!
  Done in 25.68s.

@@ -2410,31 +2441,6 @@ describe("MatrixClient", function () {
expect(rooms).toContain(room1);
expect(rooms).toContain(room2);
});

it("Ignores m.predecessor if we don't ask to use it", () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Duplicated test

@@ -292,33 +292,6 @@ describe("Poll", () => {
expect(maySendRedactionForEventSpy).toHaveBeenCalledWith(basePollStartEvent, "@charlie:server.org");
});

it("does not set poll end event when an earlier end event already exists", async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Duplicated test

@@ -356,25 +329,6 @@ describe("Poll", () => {
expect(responses.getRelations()).toEqual([responseEventAtEnd, responseEventBeforeEnd]);
});

it("does not set poll end event when sent by invalid user", async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Duplicated test

@@ -402,43 +356,6 @@ describe("Poll", () => {
expect(poll.isEnded).toBeTruthy();
});

it("replaces poll end event and refilters when an older end event already exists", async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Duplicated test

@@ -163,15 +163,6 @@ describe("SimpleHttpRendezvousTransport", function () {
);
});

it("POST with relative path response including parent", async function () {
Copy link
Contributor

Choose a reason for hiding this comment

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

Duplicated test

@weeman1337 weeman1337 self-requested a review February 7, 2023 16:10
@weeman1337 weeman1337 marked this pull request as ready for review February 7, 2023 16:10
@weeman1337 weeman1337 requested review from a team as code owners February 7, 2023 16:10
@weeman1337 weeman1337 requested review from kerryarchibald, weeman1337, hughns, dbkr and andybalaam and removed request for weeman1337 and hughns February 7, 2023 16:10
Copy link
Member

@hughns hughns left a comment

Choose a reason for hiding this comment

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

Rendezvous related changes look good. Thank you.

Copy link
Contributor

@SimonBrandner SimonBrandner left a comment

Choose a reason for hiding this comment

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

WebRTC changes LGTM

@weeman1337 weeman1337 merged commit c67325b into develop Feb 10, 2023
@weeman1337 weeman1337 deleted the madlittlemods/eslint-jest branch February 10, 2023 11:05
@MadLittleMods
Copy link
Contributor Author

Thanks for bringing this to merge @weeman1337 and for the review @hughns @andybalaam @SimonBrandner 🦧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Task Tasks for the team like planning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants