Skip to content

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
// 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.

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

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

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

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

);
});

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 andybalaam, dbkr, hughns, kerryarchibald and weeman1337 and removed request for hughns and weeman1337 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.

6 participants