1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-30 02:21:17 +03:00

Add ESLint Jest (#10261)

This commit is contained in:
Michael Weimann
2023-03-01 16:23:35 +01:00
committed by GitHub
parent db7748b743
commit 5398db21ad
55 changed files with 336 additions and 351 deletions

View File

@ -68,7 +68,7 @@ describe("Terms", function () {
const interactionCallback = jest.fn().mockResolvedValue([]);
await startTermsFlow([IM_SERVICE_ONE], interactionCallback);
expect(interactionCallback).toBeCalledWith(
expect(interactionCallback).toHaveBeenCalledWith(
[
{
service: IM_SERVICE_ONE,
@ -100,7 +100,7 @@ describe("Terms", function () {
await startTermsFlow([IM_SERVICE_ONE], interactionCallback);
expect(interactionCallback).not.toHaveBeenCalled();
expect(mockClient.agreeToTerms).toBeCalledWith(SERVICE_TYPES.IM, "https://imone.test", "a token token", [
expect(mockClient.agreeToTerms).toHaveBeenCalledWith(SERVICE_TYPES.IM, "https://imone.test", "a token token", [
"http://example.com/one",
]);
});
@ -124,7 +124,7 @@ describe("Terms", function () {
const interactionCallback = jest.fn().mockResolvedValue(["http://example.com/one", "http://example.com/two"]);
await startTermsFlow([IM_SERVICE_ONE], interactionCallback);
expect(interactionCallback).toBeCalledWith(
expect(interactionCallback).toHaveBeenCalledWith(
[
{
service: IM_SERVICE_ONE,
@ -135,7 +135,7 @@ describe("Terms", function () {
],
["http://example.com/one"],
);
expect(mockClient.agreeToTerms).toBeCalledWith(SERVICE_TYPES.IM, "https://imone.test", "a token token", [
expect(mockClient.agreeToTerms).toHaveBeenCalledWith(SERVICE_TYPES.IM, "https://imone.test", "a token token", [
"http://example.com/one",
"http://example.com/two",
]);
@ -170,7 +170,7 @@ describe("Terms", function () {
const interactionCallback = jest.fn().mockResolvedValue(["http://example.com/one", "http://example.com/two"]);
await startTermsFlow([IM_SERVICE_ONE, IM_SERVICE_TWO], interactionCallback);
expect(interactionCallback).toBeCalledWith(
expect(interactionCallback).toHaveBeenCalledWith(
[
{
service: IM_SERVICE_TWO,
@ -181,10 +181,10 @@ describe("Terms", function () {
],
["http://example.com/one"],
);
expect(mockClient.agreeToTerms).toBeCalledWith(SERVICE_TYPES.IM, "https://imone.test", "a token token", [
expect(mockClient.agreeToTerms).toHaveBeenCalledWith(SERVICE_TYPES.IM, "https://imone.test", "a token token", [
"http://example.com/one",
]);
expect(mockClient.agreeToTerms).toBeCalledWith(SERVICE_TYPES.IM, "https://imtwo.test", "a token token", [
expect(mockClient.agreeToTerms).toHaveBeenCalledWith(SERVICE_TYPES.IM, "https://imtwo.test", "a token token", [
"http://example.com/two",
]);
});